2

I have a testing server for my phpunit, and now we want to add our codeception acceptance testing with selenium.

But as you the remote server has no "desktop" so it will not open a browser like in our developers computers.

I tried installing firefox on the machine but I still get this error:

Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: LINUX      
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:02:37'                  
System info: host: 'testdev', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version:   
'3.2.0-23-generic', java.version: '1.7.0_65'                                                     
Driver info: driver.version: FirefoxDriver   

so now I did this

  WebDriver:
         url: 'http://example.com/'
         browser: firefox
         capabilities:
              binary: "/usr/bin/firefox"

and I get this error:

Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:  
  Error: no display specified                                                               
  Error: no display specified   

is it possible what I'm doing?

or I must have a "screen"?

2 Answers 2

1

In order to use Selenium with Firefox, or Chrome, etc - you need a linux distro that has a User Interface.

If you are on a linux machine that doesn't have a display (aka, just a terminal), then you can research Selenium HTMLUnit (headless browsing).

Sign up to request clarification or add additional context in comments.

Comments

0

You could do headless browsing via the PHPBrowser, or you could install a GUI like xfce4 vnc4server, which will give you a virtual desktop to run Firefox in. This has the added bonus that you can watch the test run graphically.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.