I have written an Ant target that starts Selenium server, runs my test code, and then... I would like it to stop the forked process (Selenium). How do I keep track of that forked thread that Ant created in order to stop it?
You should be able to shutdown selenium server with a direct web request to
http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer
[Here is the ant target:]
<target name="stop-server">
<get taskname="selenium-shutdown" src="http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer"
dest="result.txt" ignoreerrors="true" />
<echo taskname="selenium-shutdown" message="DGF Errors during shutdown are expected" />
</target>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.