Page History
...
- Download Selenium Server (formerly the Selenium RC Server)
- http://docs.seleniumhq.org/download/
- should be something like
selenium-server-standalone-2.42.2.jar
- Adjust
AbstractMagnoliaUITest
— locally only- Basically replace the
FirefoxDriver
with aRemoteWebDriver
- pass on the URL of your selenium server
- default URL is something like
http://{your-hostname.local}:4444/wd/hub
- pass the
FirefoxProfile
along through theDesiredCapabilities
Code Block language java title AbstractMagnoliaUITest.java URL seleniumServerUrl = null; try { String vmHostName = "your-vm-hostname"; seleniumServerUrl = new URL(String.format("http://%s.local:4444/wd/hub", vmHostName)); } catch (MalformedURLException e1) {} DesiredCapabilities capabilities = DesiredCapabilities.firefox(); capabilities.setCapability(FirefoxDriver.PROFILE, firefoxProfile); driver = new RemoteWebDriver(seleniumServerUrl, capabilities);
- Check out the attached patch file in the attachments!:
remote-webdriver.patch
- Basically replace the
...
- Adjust the
DEFAULT_DOMAIN
constant as well, inAbstractMagnoliaIntegrationTest
— locally only- should be your machine's hostname or IP address as to be reachable from the guest
- e.g.
http://mymachine.local:8299
3. Fancy shell script + desktop launcher for the Selenium server
- Create a new script, e.g.
selenium-server
on the desktop as follows- provided your selenium server jar is on the desktop too)
Code Block language bash title selenium-server.sh #!/bin/bash gnome-terminal -e "java -jar selenium-server-standalone-2.42.2.jar"
- Make it executable
chmod +x your-script
- Go to Nautilus (eq. Finder) preferences
- Edit > Preferences, "Behavior" tab
- Tick "Run executable text files when they are opened"
- The fancy icon
- Download it http://www.seleniumhq.org/images/selenium-logo.png and save it locally to e.g.
/home/{user}/.icons/
- Select your script, right-click and go to the file Properties > Click the icon and select yours
- Download it http://www.seleniumhq.org/images/selenium-logo.png and save it locally to e.g.
Double-click your script and you're good to go!
...
Overview
Content Tools