Close Browser Then Resume Test

2 posts, 0 answers
  1. Chris
    Chris avatar
    1 posts
    Member since:
    Apr 2015

    Posted 13 May 2015 Link to this post

    I'm curious if it's possible to have a web test with a step that closes the browser but then is able to continue running the test in the next step.

    I've tried using "Manager.ActiveBrowser.Close();" but that closes the browser and then ends the test. The next step that I have reopens the browser and navigates to the desired page but it never seems to go onto the next step once the browser closes. Is there a way to use a similar step that would close or restart the browser without ending the test?

  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 16 May 2015 Link to this post

    Hi Chris,

    If you close AND reopen the browser in one coded step the test will continue. Modify your next step to assume the browser is open and only do the NavigateTo.

    ActiveBrowser.Close();
    Manager.LaunchNewBrowser();


    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top