Webdriver. quit() /webdriver.close() does not work in selenium 3.141.59 | Selenium Forum
C
chaitra jagirdar Posted on 04/09/2019

Sir , referred :https://github.com/SeleniumHQ/selenium/issues/6826

https://developers.perfectomobile.com/pages/viewpage.action?pageId=21432417

 

Both my browsers have same issue:

-------------------------------------------

Sir my firefox (68.0.2) with geckodriver(latest)

Chrome(76.0.3809.132 ) with chromedriver(latest)

 

Sir is there a known alternative this issue ?

 

 

 


A
Ashish Thakur Replied on 04/09/2019

Please export your project in a zip file and share it with us.


C
chaitra jagirdar Replied on 07/09/2019

Kindly either run Test6/SuiteA.xml

Either way , only last browser instance is closed .Even after using driver.quit();

Its the same for both chrome/ff -latest drivers & i have latest supporting browsers respectively.

Selenium 3.141.59 is used.

 

Please suggest ..


A
Ashish Thakur Replied on 19/09/2019

As I noticed your code. Please make some configuration changes immediately in your pom.xml and then try executing your project.

Change the following

<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>

to this

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

In addition to the above, move to problems tab and resolve all issues in the project.


C
chaitra jagirdar Replied on 25/09/2019

hi sir,

Resolved all the warnings and changed version from 1.7 to 1.8.

Attaching project.Yet All browser instances are not quit.

Please suggest.


A
Ashish Thakur Replied on 09/10/2019

As I noticed in your code. You are using the wrong annotation.

@AfterMethod needs to be used instead of @AfterTest

As the @AfterTest will be executed only after the execution of all test cases. And due to this, old objects of driver are ignored.