Page History
...
- Setup your VM and install Ubuntu for example
- mount iso image in optical drive
- In VirtualBox preferences > Network > Host-only Networks, click the add icon
- creates a new virtual network interface e.g.
vboxnet0
- creates a new virtual network interface e.g.
- In VM Settings > Network
- 1st slot: select "Host-only Adapter", then choose the one you just created — that
vboxnet0
- 2nd slot: select NAT as is usually the default (to access the interwebs through the host)
- 1st slot: select "Host-only Adapter", then choose the one you just created — that
- Install guest additions
- When VirtualBox VM is running
- Devices > Insert Guest Additions CD image...
2. Selenium server setup
- 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:
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
...
Overview
Content Tools