TestProject Forum
Powered by leading experts in the test automation community

In a job between tests can I close browser and open new browser session without cache and cookies

Hi,

As of now I see that only 1 browser is opened in job and I am not able to find a way to close browser and open new browser session.

I have scenario where I need to login to one of the url with a user, perform some actions and logout.
Again login to another url with different user credentials, perform some actions and logout.

Due below issues I am not able to achieve successful execution of scripts

  1. For one of the url, logout is not working. Because of this my next test with different url does not work
  2. Due to bug in the UI, at somepoint it is in different page and logout link is not visible. Because of this my next test with different url does not work

In the beginning of each and every test I can check if logout is still visible and then logout and proceed. However if logout is not working this solution does not help. Also if user had logged out in previous test, this check would impact the execution time as we have may tests.

Is there a way to open and close browser for each test in a job.

Thanks,
Nirupama

Hey @nirupamav, thanks for reaching out.
Yes, there’s an option to open and close the browser for each test in a job,
which eventually will clear the session (cache and cookies),
by performing 3 simple steps:

  • click on the 3 dots in your job and click on “Edit”

image

  • click next

image

  • toggle on “Restart the browser before each test” option

image

You can contact us via TestProject Platform chat,
so we can check the reason of your 2. issue, find the element and make this step pass

1 Like

Thank you so much Meidan. Will try it out.