Having problems connecting to chrome driver. I am at this point after
having spent several hours of problems trying to get it to even find
the chromedriver. I had this working a few weeks ago - was finding
chromedriver and running tests but then I had to go off and work on
other things, just went back to working on my tests and now can't get
it working again (poor documentation on my part, I can't remember how
I got it working in the first place, but really it seems to be a
completely different set of problems than what I encountered then)
The chrome driver version I am using is 17.0.963.0 which is the
latest. I am running on an ubuntu virtual box installation
I have done the following:
created a symlink from /usr/bin/google-chrome to my chromedriver
installation /home/vagrant/chromedriver
did sudo chmod +x /usr/bin/google-chrome
have the following ruby code when creating browser
driver = Selenium::WebDriver.for :chrome
browser_type = ENV['BROWSER'] || 'chrome'
$browser ||= Watir::Browser.new browser_type.to_sym
anyway none of that was working to get it to find chromedriver.
After looking at similar problems that other people had I moved
chromedriver directly into /usr/bin and for good measure did chmod on
it too.
After which it found webdriver although the message I got was
Unable to either launch or connect to Chrome. Please check that
ChromeDriver is up-to-date. Using Chrome binary at:
/usr/bin/google-chrome
The process is started and running when I run my tests:
/usr/bin/google-chrome --disable-hang-monitor
--disable-prompt-on-repost --dom-automation --full-memory-crash-report
--no-default-browser-check --no-first-run
--automation-reinitialize-on-channel-error --homepage=about:blank
--disable-web-resources --disable-preconnect --no-first-run
--no-default-browser-check --enable-logging --log-level=1
--safebrowsing-disable-auto-update --disable-default-apps
--skip-gpu-data-loading --allow-file-access-from-files
--password-store=basic --instant-field-trial=disabled
--no-default-browser-check --test-type=ui
--user-data-dir=/tmp/.com.google.Chrome.9ErZd8
--testing-channel=NamedTestingInterface:/tmp/.com.google.Chrome.5vBCJZ
--noerrdialogs --metrics-recording-only --enable-logging
--disable-tab-closeable-state-watcher --allow-file-access
Just to make sure I physically killed the process, and redid the tests
and got it back. So its not some old process hanging around.
probably there is some stupid thing I have neglected. Please point out
stupid thing to me so I can feel embarrassed (other than the thing
about not documenting how I got it to work last time, because boy will
I never make that mistake again)!
Thanks,
Bryan Rasmussen
--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
I am still having problems - I believe I've done things as per your
suggestions correctly·
I changed from chromedriver 17 to 16 - although that says deprecated
in the downloads.
The following shows that chromedriver is an executable, and that
google-chrome in usr/bin is a symlink to it.
vagrant@vagrant-ubuntu-11:~$ file /home/vagrant/bin/chromedriver
/home/vagrant/bin/chromedriver: ELF 32-bit LSB executable, Intel
80386, version 1 (SYSV), dynamically linked (uses shared libs), for
GNU/Linux 2.6.15, stripped
vagrant@vagrant-ubuntu-11:~$ file /usr/bin/google-chrome
/usr/bin/google-chrome: symbolic link to `/home/vagrant/bin/chromedriver'
chrome is located at
/usr/lib/chromium-browser
I added it to my PATH
My path is now
/usr/share/ruby-rvm/gems/jruby-1.6.5/bin:/usr/share/ruby-rvm/gems/jruby-1.6.5@global/bin:/usr/share/ruby-rvm/rubies/jruby-1.6.5/bin:/usr/share/ruby-rvm/bin:/home/vagrant/bin:/usr/lib/chromium-browser:/usr/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/game
where /home/vagrant/bin has chromedriver (16)
/usr/bin has google-chrome
/usr/bin also has chromium-browser which is a script that uses GDB to run
/usr/lib/chromium-browser has the chromium-browser which is
chromium-browser: ELF 32-bit LSB shared object, Intel 80386, version
1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15,
stripped
which I guess is the problem? That it should be an executable instead
of a shared object?
The thing is I did have everything working as late as the 13th of this
month. Probably a library or gem has been changed in the latest code
updates that has caused it not to work, but if so and if you think it
is a problem that it is a shared object instead of an executable - is
there any way to get it to work the way it was before?
GEM list:
actionmailer (3.1.1)
actionpack (3.1.1)
activemodel (3.1.1)
activerecord (3.1.1)
activerecord-jdbc-adapter (1.2.0)
activerecord-jdbcsqlite3-adapter (1.2.0)
activerecord-oracle_enhanced-adapter (1.4.0)
activeresource (3.1.1)
activesupport (3.1.1)
acts_as_list (0.1.4)
arel (2.2.1)
bouncy-castle-java (1.5.0146.1)
builder (3.0.0)
bundler (1.0.21 ruby)
childprocess (0.2.3, 0.2.2)
cucumber (1.0.2)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.2.9)
ffi (1.0.11 java, 1.0.9 java)
gherkin (2.4.16 java)
hike (1.2.1)
i18n (0.6.0)
jdbc-sqlite3 (3.7.2)
jquery-rails (1.0.16)
jruby-launcher (1.0.9 java java)
jruby-openssl (0.7.4)
json (1.6.1 java, 1.5.3 java)
json_pure (1.6.3, 1.5.3)
liquid (2.3.0)
mail (2.3.0)
mime-types (1.17.2)
multi_json (1.0.3)
polyglot (0.3.3)
rack (1.3.5)
rack-cache (1.1)
rack-mount (0.8.3)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.1.1)
railties (3.1.1)
rake (0.9.2.2, 0.9.2, 0.8.7)
rdoc (3.11)
rsolr (1.0.3)
rsolr-ext (1.0.3)
rspec (2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
rspec-mocks (2.6.0)
ruby-plsql (0.4.4)
rubyzip (0.9.5, 0.9.4)
sass (3.1.10)
sass-rails (3.1.4)
selenium-webdriver (2.5.0)
sprockets (2.0.3)
term-ansicolor (1.0.6)
therubyrhino (1.72.8)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.30)
uglifier (1.0.4)
watir-webdriver (0.3.8, 0.3.2)
will_paginate (3.0.2)
Thanks,
Bryan Rasmussen
http://code.google.com/p/selenium/wiki/ChromeDriver
where it says
"The ChromeDriver controls the browser using Chrome's automation proxy
framework. Consequently, the ChromeDriver is only compatible with
Chrome version 12.0.712.0 or newer.
The server expects you to have Chrome installed in the default
location for each system:
OS Expected Location of Chrome
Linux /usr/bin/google-chrome1"
the expected location of chrome just went into my head as the expected
location of the chromedriver.
sorry for the trouble.
thanks,
Bryan Rasmussen
On Wed, Dec 28, 2011 at 4:27 PM, Simon Stewart