Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium not working with Firefox 3.x on linux

I am using selenium-server , selenium rc for UI testing in my application . My dev box is Windows with FireFox 3.5 and every thing is running fine and cool. But when i try to run selenium tests on my build server which is a linux box , i get this error

Caution: '/usr/bin/firefox': file is a script file, not a real executable.  The browser environment is no longer fully under RC control

basically the selenium-rc is not able to find the firefox executable on linux(actually its a .sh file here), which is present in the case of Windows .

Has anyone faced this error before. Please let me know for any pointers.

Thanks for any help

~Pratik

Thanks! Pratik

like image 690
Pratik Garg Avatar asked Nov 11 '09 09:11

Pratik Garg


2 Answers

This is occurring because Selenium wants to start the FireFox binary directly, rather than delegate to the normal launch script. Before checking for "firefox" (which is a script on many installations), it checks for "firefox-bin". You can circumvent this problem by creating a link named "firefox-bin" that points directly at your desired version of the firefox binary.

This is described under "Ubuntu fix" (though it actually applies to other Linux'es as well) in the Cucumber Wiki at:

https://github.com/cucumber/cucumber/wiki/Setting-up-Selenium/612fae3f39528be39594d145ec12a4747855e030

like image 128
Glen E. Ivey Avatar answered Sep 28 '22 05:09

Glen E. Ivey


Hey, I have Selenium running on Karmic with no issues. I can't quite remember how I did it, but I think it was a case of grabbing a more recent version ot the selenium-rc-serve.jar.

I also remember looking at this post: http://tero.tilus.net/rutinat/2009/08/18/cucumber-running-selenium-on-debian-lenny/

Hope something there points you in the right direction!

like image 43
Rodreegez Avatar answered Sep 28 '22 06:09

Rodreegez