0

I'm using a Chrome browser, but the error I'm getting is

"Unable to find chromedriver. Please download the server from http://chromedriver.storage.googleapis.com/index.html and place it somewhere on your PATH. More info at https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver."

I'm not sure where to place it on the path when developing in the cloud. Any help is much appreciated.

Here is the code in my controller

def getinformation
    require 'watir'

    browser = Watir::Browser.new

    browser.goto('http://stackoverflow.com/')

    @broswer = browser.title

end
ChrisWilson
  • 459
  • 1
  • 6
  • 19
  • 1
    You are using `watir` in your actual application, not just for testing? – engineersmnky Aug 08 '17 at 19:09
  • Yeah, I want to use it to webscrape. – ChrisWilson Aug 08 '17 at 19:10
  • 1
    `nokogiri` will do a much better job as a page scraper and if you need `js` functionality `watir` and `phantomjs` rather than a full chrome driver is probably a better bet. – engineersmnky Aug 08 '17 at 19:12
  • Could you perhaps explain what watir, and what phantomjs do and how they work together? – ChrisWilson Aug 08 '17 at 19:25
  • 1
    [`phantomjs`](http://phantomjs.org/) is a headless webkit that is fully js scriptable. `ghostdriver` is an integrated web driver as of phantomjs 1.8 and provides the web driver functionality needed by watir. `nokogiri` will provide the page parsing as needed. [PhantomJs Ruby example using selenium](http://phantomjs.org/release-1.8.html) (maybe this [video](https://www.youtube.com/watch?v=QK_uRnS5cT8) will help as well). using `npm` (should be available on cloud 9) one can install phantomjs using `npm i -g phantomjs-prebuilt` the `-g` makes it global – engineersmnky Aug 08 '17 at 19:45
  • you can run `echo $PATH` in bash to see all the folders, but a safe bet would be /usr/bin or /usr/local/sbin – max pleaner Aug 08 '17 at 20:24

0 Answers0