running the sample code from README.me section 'Install from Github' on a mac laptop, some error logs appear
Please wait... I'm trying to login in...
INFO Wechaty v0.3.17 initializing...
ERR PuppetWebBrowser init() exception: The ChromeDriver could not be found on the current PATH. Please download the latest version of the ChromeDriver from http://chromedriver.storage.googleapis.com/index.html and ensure it can be found on your PATH.
ERR PuppetWeb initBrowser() exception: The ChromeDriver could not be found on the current PATH. Please download the latest version of the ChromeDriver from http://chromedriver.storage.googleapis.com/index.html and ensure it can be found on your PATH.
this link will fix the problem
http://stackoverflow.com/questions/27733731/passing-requirechromedriver-path-directly-to-selenium-webdriver
Thanks for your issue and solution.
This problem will bite you when you run sample code without the PATH include chromedriver.
I prefer two solution:
npm install -g chromedriver to install chromedriver globalynpm run to start your code. Because after npm install, chromedriver be installed at node_modules/.bin/chromedriver, and this path will be include in PATH if you use npm run command.you can have a look of npm run demo in package.json here:
https://github.com/wechaty/wechaty/blob/add0b3a68bda3a1bef120c6fced7ebef30a4cb9e/package.json#L31
I'll tag this issue as FAQ because even me sometimes can't find chromedriver... ;-]
npm run works great, but a chrome browser shows up when I run the code, is there a way to hide the chrome browser like the old phantomjs way? Thanks.
chrome browser can be hide if:
Xvfb under linux and set DISPLAY to itcygwin under win32 and ssh to it via 127.0.0.1. in my win7, it seems more like a bug than a feature, because all windows will not appear. :pdocker to run wechaty docker. it will be more complicated than others now, because you need to build docker your self. But it will be the easiest way to run wechaty, after wechaty.io online, which is the cloud controller for wechaty docker, so you can just start wechaty standard docker as well.
Most helpful comment
Thanks for your issue and solution.
This problem will bite you when you run
sample codewithout thePATHincludechromedriver.I prefer two solution:
npm install -g chromedriverto install chromedriver globalynpm runto start your code. Because afternpm install, chromedriver be installed atnode_modules/.bin/chromedriver, and this path will be include in PATH if you usenpm runcommand.you can have a look of
npm run demoin package.json here:https://github.com/wechaty/wechaty/blob/add0b3a68bda3a1bef120c6fced7ebef30a4cb9e/package.json#L31
I'll tag this issue as FAQ because even me sometimes can't find chromedriver... ;-]