Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChromeDriver PATH problem #30

Closed
robaggio opened this issue Sep 18, 2016 · 3 comments
Closed

ChromeDriver PATH problem #30

robaggio opened this issue Sep 18, 2016 · 3 comments
Labels

Comments

@robaggio
Copy link

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

@huan
Copy link
Member

huan commented Sep 18, 2016

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:

  1. npm install -g chromedriver to install chromedriver globaly
  2. use npm 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:

"demo": "node example/ding-dong-bot.js"

I'll tag this issue as FAQ because even me sometimes can't find chromedriver... ;-]

@huan huan added the faq label Sep 18, 2016
@robaggio
Copy link
Author

robaggio commented Sep 21, 2016

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.

@huan
Copy link
Member

huan commented Sep 21, 2016

chrome browser can be hide if:

  1. use Xvfb under linux and set DISPLAY to it
  2. use cygwin 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. :p
  3. use docker 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.
  4. last but not least, we should fix phantomjs for wechaty in the future, I believe there's a compatible bug inside wx javascript, it should be easy to fix if we find out why.

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

No branches or pull requests

2 participants