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

Ruby chrome bindings not able to locate the chrome driver on 64 bit mac (MBP112.0138.B07) #8590

Closed
lukeis opened this Issue Mar 4, 2016 · 4 comments

Comments

Projects
None yet
1 participant
@lukeis
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 8590

class Test_2
  require "selenium-webdriver"

  gem "test-unit"
  require "test/unit"

  class Untitled < Test::Unit::TestCase

 def setup
  # @driver = Selenium::WebDriver.for :chrome
  # @accept_next_alert = true
   #@driver.manage.timeouts.implicit_wait = 30
   #@verification_errors = []

   #path = "Projects/Executables/chromedriver.exe"
   profile = Selenium::WebDriver::Chrome::Profile.new
   profile['download.prompt_for_download'] = false
   profile['download.default_directory'] = "/Users/amit/.rvm/gems/ruby-2.2.0/gems/chromedriver-installer-0.0.6/bin/chromedriver"
   @driver = Selenium::WebDriver.for :chrome, :profile => profile

   Selenium::WebDriver::Chrome.path = '/Users/amit/.rvm/gems/ruby-2.2.0/gems/chromedriver-installer-0.0.6/bin'
   @driver = Selenium::WebDriver.for :chrome

  @accept_next_alert = true
  @driver.manage.timeouts.implicit_wait = 30
  @verification_errors = []
 end

  def test_untitled
    @driver.get("http://www.google.com");
    puts "test****"
     element = driver.find_element(:name, 'q')
     element.send_keys "Selenium Tutorials"
     element.submit

   end
  end

end

Error: test_untitled(Test_2::Untitled)
: Selenium::WebDriver::Error::WebDriverError: Unable to find the chromedriver executable.
Please download the server from http://chromedriver.storage.googleapis.com/index.html
and place it somewhere on your PATH. More info at http://code.google.com/p/selenium/wiki/ChromeDriver.
/Users/amit/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.45.0/lib/selenium/webdriver/chrome/service.rb:20:in
`executable_path'
/Users/amit/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.45.0/lib/selenium/webdriver/chrome/service.rb:33:in
`default_service'
/Users/amit/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.45.0/lib/selenium/webdriver/chrome/bridge.rb:14:in
`initialize'
/Users/amit/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.45.0/lib/selenium/webdriver/common/driver.rb:37:in
`new'
/Users/amit/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.45.0/lib/selenium/webdriver/common/driver.rb:37:in
`for'
/Users/amit/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.45.0/lib/selenium/webdriver.rb:67:in
`for'
/Projects/Ruby_workspace/test_ruby/test_2.rb:19:in `setup'


Selenium version: 2.45
OS: MAC 64 bit
Browser: chrome
Browser version: 41.0.2272.76 (64-bit)


Please provide any additional information below. A sample reduced test
case, or a public URL that demonstrates the problem will intrigue our merry
band of Open Source developers far more than nothing at all: they'll be far
more likely to look at your problem if you make it easy for them!

Reported by mr.amitvpatil on 2015-03-10 13:41:02

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
I have set all env variables correctly on my mac see env output:

chrome amit$ env
rvm_bin_path=/Users/amit/.rvm/bin
TERM_PROGRAM=Apple_Terminal
GEM_HOME=/Users/amit/.rvm/gems/ruby-2.2.0
TERM=xterm-256color
SHELL=/bin/bash
IRBRC=/Users/amit/.rvm/rubies/ruby-2.2.0/.irbrc
TMPDIR=/var/folders/sz/k40dlxtd1wvf0htp8cfcj3xh0000gn/T/
Apple_PubSub_Socket_Render=/tmp/launch-c2suXt/Render
TERM_PROGRAM_VERSION=326
OLDPWD=/Users/amit/.rvm/gems/ruby-2.2.0/gems/selenium-webdriver-2.45.0/lib/selenium/webdriver/common
MY_RUBY_HOME=/Users/amit/.rvm/rubies/ruby-2.2.0
TERM_SESSION_ID=65125317-9F5E-44FA-B1A4-9EE1320F548E
USER=amit
_system_type=Darwin
rvm_path=/Users/amit/.rvm
SSH_AUTH_SOCK=/tmp/launch-jox6zV/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0:0
rvm_prefix=/Users/amit
__CHECKFIX1436934=1
PATH=/Users/amit/.rvm/gems/ruby-2.2.0/bin:/Users/amit/.rvm/gems/ruby-2.2.0@global/bin:/Users/amit/.rvm/rubies/ruby-2.2.0/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/:/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin:/Applications/apache-maven-3.2.5/bin:/usr/local/Cellar/chromedriver/2.14/bin:/Users/amit/.rvm/bin
PWD=/Users/amit/.rvm/gems/ruby-2.2.0/gems/selenium-webdriver-2.45.0/lib/selenium/webdriver/chrome
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
LANG=en_US.UTF-8
_system_arch=x86_64
CHROME_DRIVER=/usr/local/Cellar/chromedriver/2.14
_system_version=10.9
rvm_version=1.26.10 (latest)
M2_HOME=/Applications/apache-maven-3.2.5
HOME=/Users/amit
SHLVL=1
LOGNAME=amit
GEM_PATH=/Users/amit/.rvm/gems/ruby-2.2.0:/Users/amit/.rvm/gems/ruby-2.2.0@global
RUBY_VERSION=ruby-2.2.0
SECURITYSESSIONID=186a4
_system_name=OSX
_=/usr/bin/env

Reported by mr.amitvpatil on 2015-03-10 13:44:23

Member

lukeis commented Mar 4, 2016

I have set all env variables correctly on my mac see env output:

chrome amit$ env
rvm_bin_path=/Users/amit/.rvm/bin
TERM_PROGRAM=Apple_Terminal
GEM_HOME=/Users/amit/.rvm/gems/ruby-2.2.0
TERM=xterm-256color
SHELL=/bin/bash
IRBRC=/Users/amit/.rvm/rubies/ruby-2.2.0/.irbrc
TMPDIR=/var/folders/sz/k40dlxtd1wvf0htp8cfcj3xh0000gn/T/
Apple_PubSub_Socket_Render=/tmp/launch-c2suXt/Render
TERM_PROGRAM_VERSION=326
OLDPWD=/Users/amit/.rvm/gems/ruby-2.2.0/gems/selenium-webdriver-2.45.0/lib/selenium/webdriver/common
MY_RUBY_HOME=/Users/amit/.rvm/rubies/ruby-2.2.0
TERM_SESSION_ID=65125317-9F5E-44FA-B1A4-9EE1320F548E
USER=amit
_system_type=Darwin
rvm_path=/Users/amit/.rvm
SSH_AUTH_SOCK=/tmp/launch-jox6zV/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0:0
rvm_prefix=/Users/amit
__CHECKFIX1436934=1
PATH=/Users/amit/.rvm/gems/ruby-2.2.0/bin:/Users/amit/.rvm/gems/ruby-2.2.0@global/bin:/Users/amit/.rvm/rubies/ruby-2.2.0/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/:/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin:/Applications/apache-maven-3.2.5/bin:/usr/local/Cellar/chromedriver/2.14/bin:/Users/amit/.rvm/bin
PWD=/Users/amit/.rvm/gems/ruby-2.2.0/gems/selenium-webdriver-2.45.0/lib/selenium/webdriver/chrome
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
LANG=en_US.UTF-8
_system_arch=x86_64
CHROME_DRIVER=/usr/local/Cellar/chromedriver/2.14
_system_version=10.9
rvm_version=1.26.10 (latest)
M2_HOME=/Applications/apache-maven-3.2.5
HOME=/Users/amit
SHLVL=1
LOGNAME=amit
GEM_PATH=/Users/amit/.rvm/gems/ruby-2.2.0:/Users/amit/.rvm/gems/ruby-2.2.0@global
RUBY_VERSION=ruby-2.2.0
SECURITYSESSIONID=186a4
_system_name=OSX
_=/usr/bin/env

Reported by mr.amitvpatil on 2015-03-10 13:44:23

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
I have been trying to see if it works keeping the  chrome driver in different locations.
Thats why you may see variables CHROME_DRIVER=/usr/local/Cellar/chromedriver/2.14

but the actual ones is at "/Users/amit/.rvm/gems/ruby-2.2.0/gems/chromedriver-installer-0.0.6/bin/"

Reported by mr.amitvpatil on 2015-03-10 13:47:38

Member

lukeis commented Mar 4, 2016

I have been trying to see if it works keeping the  chrome driver in different locations.
Thats why you may see variables CHROME_DRIVER=/usr/local/Cellar/chromedriver/2.14

but the actual ones is at "/Users/amit/.rvm/gems/ruby-2.2.0/gems/chromedriver-installer-0.0.6/bin/"

Reported by mr.amitvpatil on 2015-03-10 13:47:38

@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member
Selenium::WebDriver::Chrome.path must point to the chromedriver executable

Reported by barancev on 2015-03-12 07:31:34

  • Status changed: Invalid
  • Labels added: Lang-Ruby
Member

lukeis commented Mar 4, 2016

Selenium::WebDriver::Chrome.path must point to the chromedriver executable

Reported by barancev on 2015-03-12 07:31:34

  • Status changed: Invalid
  • Labels added: Lang-Ruby
@lukeis

This comment has been minimized.

Show comment
Hide comment
@lukeis

lukeis Mar 4, 2016

Member

Reported by luke.semerau on 2015-09-17 18:25:56

  • Labels added: Restrict-AddIssueComment-Commit
Member

lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 18:25:56

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this Mar 4, 2016

@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.