You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.
If main thread of the program exited with exception (and not finalized properly), the
process IEDriverServer.exe is not removed.
Selenium version : 2.25.0
IEDriver version: 2.25.1 Win 32
Steps to reproduce:
1) Create a temp dir, lets say 'testcase'
2) Create 'testcase\bin' and put there selenium-server-standalone-2.25.0.jar and IEDriverServer.exe
(can be downloaded from: http://selenium.googlecode.com/files/selenium-server-standalone-2.25.0.jar
and http://selenium.googlecode.com/files/IEDriverServer_Win32_2.25.1.zip)
Also put there the Rhino jar: js.jar from https://github.com/downloads/mozilla/rhino/rhino1_7R4.zip
3) Save the following test case to the 'testcase.js':
java.lang.System.setProperty("webdriver.ie.driver", "bin\\IEDriverServer.exe")
var driverClass = Packages.org.openqa.selenium.ie.InternetExplorerDriver
var driver = new driverClass()
driver.get('http://google.com')
throw "yo"
4) Launch it with:
java -cp "bin\binary\selenium-server-standalone-2.25.0.jar;bin\binary\js.jar" org.mozilla.javascript.tools.shell.Main
test.js
Note, that after running test case, the IEDriverServer.exe will still be running in
the background, effectively leaking the memory.
Reported by nickolay8 on 2012-07-20 12:48:01
The text was updated successfully, but these errors were encountered:
Hi,
i'm not sure that it's bug.
If uncaught exception is occured then IEDriverServer.exe and iexplore.exe can not closed
w/o any actions.
This code will work well, i think:
--------------------------------
java.lang.System.setProperty("webdriver.ie.driver", "bin\\IEDriverServer.exe")
var driverClass = Packages.org.openqa.selenium.ie.InternetExplorerDriver
var driver = new driverClass()
try {
driver.get('http://google.com')
throw "yo"
} catch (e) {
//
} finally {
driver.quit()
}
--------------------------------
I has no experience with Rhino so i can be mistaken.
If I'm not mistaken one can use "shutDownHook" for cleanup, which will be called when
process exit, regardless is it because of exception or not:
(Again, Rhino script, I was using it in some other program):
java.lang.Runtime.getRuntime().addShutdownHook(java.lang.Thread(function () {
}))
Selenium provides an API to drive the IE browser using a driver executable. This API
includes 'quit' operation that stops the browser and the driver and performs cleanup.
Selenium is an API rather than a test execution framework, hence it just provides an
operation to stop the browser and the driver. To call it or not to call -- it's your
choice. If you don't call this operation, Selenium doesn't perform cleanup. You may
use whatever you want: a shutdown hook, a 'tear down' method of your framework, a try-catch
block, anything else.
If you want to negotiate this design desision welcome to IRC channel [1] or dev list
[2]!
[1] #selenium at Freenode (irc.freenode.net)
[2] https://groups.google.com/forum/?fromgroups#!forum/selenium-developers
Originally reported on Google Code with ID 4288
Reported by
nickolay8
on 2012-07-20 12:48:01The text was updated successfully, but these errors were encountered: