Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Selenium 3/FF and Drupal VM - solved #967

Closed
welly opened this issue Nov 3, 2016 · 3 comments
Closed

Selenium 3/FF and Drupal VM - solved #967

welly opened this issue Nov 3, 2016 · 3 comments

Comments

@welly
Copy link

welly commented Nov 3, 2016

Spent a little bit of time trying to figure out getting Selenium 3 working with Firefox to get our behat tests with javascript working. Turns out it's pretty simple!

Drupal VM installs the latest version of Firefox which needs to use the GeckoDriver. FF greater than 48.x needs this driver for Selenium to work. You can download it from:

https://github.com/mozilla/geckodriver/releases

Secondly, installing Selenium standalone version 3.0.1 works with no configuration.

So, in my config.yml I have:

selenium_version: 3.0.1
selenium_install_firefox: yes

and I created a post-provision script which looks like:

#!/bin/bash

GECKO_VERSION="0.11.1"
GECKO_DOWNLOAD="https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v$GECKO_VERSION-linux64.tar.gz"
GECKO_DOWNLOAD_DIR="/tmp"
GECKO_NAME="geckodriver"
GECKO_PATH="/usr/local/bin"
GECKO_FULL_PATH="/usr/local/bin/$GECKO_NAME"

if [ ! -e "$GECKO_FULL_PATH" ]; then
wget -qO- $GECKO_DOWNLOAD | tar xvz -C $GECKO_DOWNLOAD_DIR
sudo cp -a $GECKO_DOWNLOAD_DIR/$GECKO_NAME $GECKO_PATH
else
exit 0
fi

This installs the driver in a location that selenium can find it. Simple as that and it appears to be working as expected.

@geerlingguy
Copy link
Owner

@welly - Thanks for posting this information! It looks like the upstream role arknoll.selenium, used for this functionality, is now defaulting to Chromium/it's driver—it might be good to post this information as an issue/feature request for that role, since Drupal VM itself doesn't really handle the Selenium bits.

@welly
Copy link
Author

welly commented Nov 3, 2016

Cheers @geerlingguy, I shall do that!

@geerlingguy
Copy link
Owner

Great, looks like it's here: arknoll/ansible-role-selenium#21

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants