Can't run Selenium test with a Ubuntu 10.10

Hi,

I have a Linode and would like to run some Salenium test on it. But I am getting the following errors:

unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) (Selenium::WebDriver::Error::WebDriverError)

The reason is that firefox can't be start up through command line. I also tried the followings:

~$ firefox

Error: no display specified

I understand there shouldn't be any display attached to the server. But is there any solution to start a firefox from command line?

Thanks,

Owen

4 Replies

I've run selenium on Linode by setting up X and VNC on the server so I can VNC in to it and watch Firefox play the Selenium scripts.

It worked really well, even used it as a sort of monitor to constantly play the selenium scripts against the live site and alert on failure. VNC was very convenient because when it failed I could see what the failed web page looked like in firefox.

So I'd suggest setting up and x environment and VNC server, then run firefox in that.

If you're running a reasonable OS locally (not Windows), you can add the -X option to ssh's command line and it will proxy requests to your local X server. firefox will, of course, perish when your ssh connection goes away, but it will get past the immediate problem.

Hi

thanks for the advice! Do you have any useful links on setting up minimum x environment and VNC server on Ubuntu?

Actually I am running the selenium through Hudson/Jenkins, would it still work that way?

Thanks in advance,

Owen

@kiomava:

I've run selenium on Linode by setting up X and VNC on the server so I can VNC in to it and watch Firefox play the Selenium scripts.

It worked really well, even used it as a sort of monitor to constantly play the selenium scripts against the live site and alert on failure. VNC was very convenient because when it failed I could see what the failed web page looked like in firefox.

So I'd suggest setting up and x environment and VNC server, then run firefox in that.

Googling for "ubuntu remote vnc howto headless" shows a few decent looking howtos:

http://www.scotttyee.com/blog/2009/12/0 … -with-vnc/">http://www.scotttyee.com/blog/2009/12/09/linux-headless-ubuntu-with-vnc/

http://stevenharman.net/blog/archive/20 … u-box.aspx">http://stevenharman.net/blog/archive/2008/12/13/vnc-to-a-headless-ubuntu-box.aspx

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct