Hacker News new | ask | show | jobs
by jakozaur 3666 days ago
I used http://nightwatchjs.org/ as a library talk to selenium, but plethora of WebDriver wrapper rather confused me, than added value.

Btw, can you point me to some tutorial that teach you in 15 minutes from zero how to setup something that can change any url into a thumbnail screen shoot. You can do that with phantomjs:

brew install phantomjs

http://phantomjs.org/screen-capture.html

Maybe a selenium pro can do it quickly, but for me:

1. How to install selenium? It took me few attempts until I realized that Docker containers are the best way.

2. Install Docker on MacOS and start container.

3. Find some toolkit that talks to selenium. There are tons of libraries, but just some have reasonable docs and are well maintained.

4. Configure this toolkit so it can talk to Selenium.

5. Beware if your container die. Also figuring out that website is loaded is also non-trivial in Selenium and default are worse than in PhantomJS.

6. Etc.

1 comments

I'm kind of curious how you came to Docker and PhantomJS being the easiest way, that sounds like the worst possible way to me.

To get things started simply with JS just follow instructions here: http://webdriver.io/guide.html

The only major diversions from that are to use Mocha or Jasmine for your test framework (instructions on the same site) and to automate starting / stopping the selenium server for which there are grunt/gulp plugins.