Selenium driver rails


#1

Hello,

For rails development I need to use the selinium driver.
But then I see this error :

Could not find Firefox binary (os=linux). Make sure Firefox is installed or set the path manually with Selenium::WebDriver::Firefox::Binary.path=

so I tried to install firefox this way :

sudo apt-get install firefox xvfb

but then I see this errror message :

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
firefox : Depends: libstartup-notification0 (>= 0.8) but it is not installable
Recommends: xul-ext-ubufox but it is not going to be installed
Recommends: libdbusmenu-glib4 but it is not installable
Recommends: libdbusmenu-gtk4 but it is not installable
xvfb : Depends: xserver-common (>= 2:1.15.1-0ubuntu2.7) but it is not going to be installed
Depends: x11-xkb-utils but it is not installable
E: Unable to correct problems, you have held broken packages.

How can I take care that I can do the test ?

Roelof


#2

I’m having this problem to. Did you find any solution?


#3

I finally used the poltergeist driver , You do not need to use a web browser at all.


#4

I had the same problem. Finally managed to get tests working with Selenium by installing Firefox xvfb (rather than just Firefox) and running tests with xvfb-run. See below.
sudo apt-get install firefox xvfb
xvfb-run rake
I don’t really understand why this works but Selenium wouldn’t launch with Firefox normally. If someone can explain that would be great!


#5

How is that? can you show how it can work with out off web browser?