1

I am attempting to get PHPUnit tests running with Selenium.

I start up selenium:

java -jar selenium-server-standalone-2.32.0.jar &

Run my tests:

phpunit --verbose suite/TestSuite.php

... and this is where things tend to go wrong on the Selenium RC side. When Selenium attempts to "Preparing Firefox profile..." it errors out due to the following:

ERROR - Failed to start new browser session, shutdown browser and clear all session data
java.lang.RuntimeException: Timed out waiting for profile to be created!

So what I take from that, is that a fresh install of Firefox, there is no original profile created and it wants to make one for the session. Apparently this takes forever and Selenium is timing out because of it.

So I try to make a profile from command line for Firefox that I will then be able to tell Selenium to use.

firefox -CreateProfile selenium

Alas, no joy:

Error: cannot open display: :22

Since this is an EC2 instance, there is no display (X) . So... not sure what my options are now. I tried to run the PHPUnit tests using Chrome browser instead, but for whatever reason, it still want to create a Firefox Profile ... whiskey tango.

If anyone has any suggestions, I would appreciate it.

1

1 Answer 1

2

running it headless like so:

export DISPLAY=:0.0
xvfb-run --auto-servernum --server-num=0 java -jar selenium-server-standalone-2.32.0.jar > /dev/null 2>&1 &
0

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.