Question

We are using Intern to test our application. We have three different Intern configuration files which we use to target either a local instance of Selenium, an instance running on a local virtual machine, or Sauce Labs.

Intern runs tests against Firefox on both the local instance and the virtual machine without error. However, when I add Chrome to the list of browsers I would like to be tested against, on both the local and virtual machine instance, I get an error indicating: "The environment you requested was unavailable". I know that the required browser is available in both locations, and in fact I know that this process has worked in the past. What could have changed and what do I need to configure to make Intern and or Selenium see Chrome again?

I'm working on a machine running Windows 7 and the VM I have installed runs up an Ubuntu image, carefully installing Firefox, Chrome and PhantomJS along the way.

When running against a local instance of Selenium we are using the following configurations:

capabilities: {
    'selenium-version': '2.39.0'
},

environments: [
    { browserName: 'chrome' },
    { browserName: 'firefox' }
]

When running against Selenium on an Ubuntu VM we are using the following configurations:

capabilities: {
    'selenium-version': '2.39.0'
},

environments: [
    { browserName: 'chrome' },
    { browserName: 'firefox' },
    { browserName: 'phantomjs' }
]
Was it helpful?

Solution

Since raising this question I have made some progress with the VM version of the testing. Our setup.sh file which configures the various components added to the VM was referencing an old version of chromedriver:

Old configuration:

wget "https://chromedriver.googlecode.com/files/chromedriver_linux64_2.3.zip"
unzip chromedriver_linux64_2.3.zip
mv chromedriver /usr/local/bin

Became:

wget "http://chromedriver.storage.googleapis.com/2.9/chromedriver_linux64.zip"
unzip chromedriver_linux64.zip
mv chromedriver /usr/local/bin

At the moment I am still unable to make the local version of our tests run Chrome however. The chromedriver is installed as part of Intern as far as I can see and even though I cleared my npm cache and reinstalled, and in fact even when I replaced the automatically included chromedriver with one downloaded manually, it still gives me the "The environment you requested was unavailable" fault.

Back in the VM environment we are trying to use PhantomJS. Intern seems to be able to initialise an instance of Phantom but it then hangs before any tests have been run. Phantom includes its own (ghost)driver and I believe its startup is configured correctly as follows:

echo "Starting Phantomjs ..."
phantomjs --ignore-ssl-errors=true --web-security=false --webdriver=192.168.56.4:4444 &

If anyone has any pointers to making chrome work on my local machine and phantom work on the VM I would be most welcome.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top