Linux automation selenium test: firefox cannot be closed automatically

I am running automation testing for the web GUI on Linux by selenium (selenium RC). In fact, I can run the selenium automation test in windows, the results are excellent, and firefox can be closed automatically after the test is completed. But when I put the selenium test in linux, I found that firefox could not be closed automatically after the test was completed. I know that the test script will call the tearDown function by default, so firefox should be closed. But why in Linux firefox cannot be disabled automatically?

To deal with this problem: I redefine the tearDown function as shown below:

 public void tearDown() throws Exception { selenium.click("link=Logout"); super.tearDown(); } 

But on Linux, Firefox cannot yet be closed.
Can someone help me with this problem? How to make firefox close after the test is completed? PS: So far I have not found a way to close firefox, and by the way, I use the -firefoxProfileTemplate option to run selenium-server.jar, because my web interface is https.

+4
source share
2 answers

The problem is resolved: this is because of my firefox. This is because Selenium wants to run the FireFox binary directly, rather than delegating it to a normal script run. Before checking for "firefox" (which is a script on many installations), it checks for "firefox-bin". But I installed firefox to run firefox, not firefox-bin. More information can be found at: Selenium does not work with Firefox 3.x on Linux

+3
source

Calling the stop() function should disable the browser. If not, check if you -browserSessionReuse when starting the server.

+1
source

All Articles