You are here
digg_de - Sat, 2016/11/05 - 21:39
Hi,
has anyone experiences to get SeleniumHQ or Watir running on a Turnkey Lamp?
I just install ruby and ruby-dev and the watir-webdriver or selenium-webdriver. But it is not easy the get an inspector like firefox or chrome running on the lamp, because there is no X.
Has anyone an idea to get it running.
Thanks!!!
Forum:
Hi there.
IIRC there is a way to run it headlessly using headless webkit and/or something like PhantomJS. Actually a quick google bought up this page which looks relevant?!
Thanks
I'm now testing selenium or watir with the headless extension (https://github.com/leonid-shevtsov/headless). It works fine on ubuntu. But i will integrated in the turnkey lamp, but there are some difficulties to get firefox running.
Thanks for help!
HowTo
Here a summary to get watir working on turnkey lamp:
Install Firefox:
Download and install geckodriver from here: https://github.com/mozilla/geckodriver/releases
Install Watir:
Install headless:
Now you can use firefox for headless web testing with ruby like this:
This is working fine. I'm now trying to get it workking with google chrome ...
Thanks for sharing! :)
Update with chrome
I found now a way to use chrome/chromium for web testing.
Install chrome:
Install chromium:
You need both google-chrome and chromium. Google-chrome is not running, but is neccessary for the gnomedriver for watir. Chromium is running with parameter --no-sandbox:
Download and install chromedriver from here: https://sites.google.com/a/chromium.org/chromedriver/
Install watir and headless.
Now you can use chrome for headless web testing (with disabled image download) with ruby like this:
Works fine ... and it's quite faster than firefox ...
Add new comment