ericmckean / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

how to override the chrome binary path? broken documentation link #1011

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
this page: 
https://code.google.com/p/selenium/wiki/ChromeDriver#Overriding_the_Chrome_binar
y_location

suggests it might be possible to override the default path but i'm not seeing 
the actual instructions of how to do so.

Original issue reported on code.google.com by dmitriki...@gmail.com on 7 Jan 2015 at 4:17

GoogleCodeExporter commented 9 years ago
i have tried adding the binary field to my config:

capabilities: {
 binary: '/path/to/my/chrome'

but didn't seem to work. still getting:

protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1702
      throw error;
            ^
UnknownError: unknown error: cannot find Chrome binary

Original comment by dmitriki...@gmail.com on 7 Jan 2015 at 4:24

GoogleCodeExporter commented 9 years ago
find your chrome, and give a correct path and name
e.g
/usr/bin/google-chrome
if still not work,  please provide me the codes

Original comment by andrewch...@chromium.org on 8 Jan 2015 at 2:26

GoogleCodeExporter commented 9 years ago
If it  works, please let me know so that we close the ticket.

Original comment by andrewch...@chromium.org on 8 Jan 2015 at 7:32

GoogleCodeExporter commented 9 years ago
is it not possible to use a non-default path? i'm working with an environment 
where i do not have permission to write in /usr/bin.

Original comment by dmitriki...@gmail.com on 8 Jan 2015 at 7:34

GoogleCodeExporter commented 9 years ago
no need to write in /usr/bin.
your error 
UnknownError: unknown error: cannot find Chrome binary
show you may not have correct path+chrome name
can you lunch chrome manually with full path+chrome name?

Original comment by andrewch...@chromium.org on 8 Jan 2015 at 8:08

GoogleCodeExporter commented 9 years ago
config looks like:

    capabilities: {
        'browserName': 'chrome',
    'binary': '/home/dmitri/bin/chrome'
    },

i can launch chrome from /home/dmitri/bin/chrome successfully if i just type it 
on the command line. that path is a wrapper script to the actual location that 
adds the --no-sandbox option (needed i believe since i do not have root on this 
host).

Original comment by dmitriki...@gmail.com on 8 Jan 2015 at 8:29

GoogleCodeExporter commented 9 years ago
if /home/dmitri/bin/chrome is a script, can you move/copy  to somewhere else 
where you can access?

Original comment by andrewch...@chromium.org on 8 Jan 2015 at 8:49

GoogleCodeExporter commented 9 years ago
yes i could move /home/dmitri/bin/chrome to any other location for which i have 
write access. are you suggesting any other location in particular? does my 
configuration for the "capabilities" map look correct?

Original comment by dmitriki...@gmail.com on 8 Jan 2015 at 8:53

GoogleCodeExporter commented 9 years ago
1.  any your own file system will do
2. not sure how you set capabilities?  Normally, through programming.
   you can try and see

Original comment by andrewch...@chromium.org on 8 Jan 2015 at 10:31

GoogleCodeExporter commented 9 years ago
to answer #2, i'm setting 'capabilities' in a configuration file i'm using for 
invoking protractor (the angularjs testing tool). like this:

node_modules/protractor/bin/protractor my-config.js

this is probably more a protractor mis-use or bug than chromedriver actually.

Original comment by dmitriki...@gmail.com on 9 Jan 2015 at 5:12

GoogleCodeExporter commented 9 years ago
I have never used it before,  but you have other option to work around.
use Selenium hub to set the chrome path
e.g
exports.config = {
  seleniumAddress: 'http://localhost:4444/wd/hub',
  specs: ['todo-spec.js']
};

Original comment by andrewch...@chromium.org on 9 Jan 2015 at 6:21

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:18