How to make IE start withhome page by InternetExplorerDriver so they won't retained when the next test runs?

41 views Asked by At

When I run tests using InternetExplorerDriver it sometimes retains tabs from the old tests when next tests are run.

I know this is connected to the setting in IE presented below, but I need that setting being automated through InternetExplorerDriver. How to set IE to use Start with home page?

enter image description here

1

There are 1 answers

1
Deepak-MSFT On

Looks like you are not quitting the driver after completing the work.

You can use driver.quit whenever you want to end the program. It will close all opened browser windows and terminates the WebDriver session.

If you do not use driver.quit at the end of the program, the WebDriver session will not close properly and files would not be cleared from memory. This may result in memory leak errors.