Forum Discussion

purplejue's avatar
purplejue
New Contributor
4 months ago

Suppress Browser Warnings

Hi,

I am using keyword tests for testing with browser loops in it. I have a test that opens the desired url and leaves it open for further tests to build upon it. With this the browser loop seems to have two checks in it that are leaving warnings when ran.

They are:

"The browser is already running."

"The {browser} was not closed after the loop iteration was finished."

Does anyone know if there is a way in keyword testing to suppress or remove those warnings from happening?

3 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    The Browser Loop requires that you close the browser at the end of each set of tests before you cycle to the next browser. Those errors are to be expected if you are leaving the browser open each time. 

    https://support.smartbear.com/testcomplete/docs/keyword-testing/reference/web/browser-loop.html

    You can either put all the needed tests for one browser pass inside the loop and then close it as required, or you can just close it as required and reopen it for the tests later on.

     

  • purplejue's avatar
    purplejue
    New Contributor

    If that is the case, is there a way I can suppress those warnings in a keyword test?

    • rraghvani's avatar
      rraghvani
      Champion Level 3

      You might need to reorganise your keyword tests. Such that the first step is to open the browser with URL. Then loop through your remaining tests.

      Without screenshots, it's difficult to provide any suggestions.