3 Replies - 819 Views - Last Post: 19 January 2018 - 03:20 PM Rate Topic: -----

#1 simonugor   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 26-October 17

Ruby with chromedriver

Posted 13 January 2018 - 09:21 AM

Hello,
I am trying to work with chromedriver through ruby on mac terminal (irb). I thought I downloaded all required gems (Watir, Selenium) and I also downloaded chromedriver itself but I keep getting this error as soon as I type browser = Watir::Browser.new :chrome

Selenium::WebDriver::Error::SessionNotCreatedError: session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"(B1141096258FDA6472D88DCB1FCEA94E)","isDefault":true},"id":1,"name":"","origin":"://>/"}
  (Session info: chrome=63.0.3239.132)
  (Driver info: chromedriver=2.19.346063 (38b35413bd4a486d436a9749e090454bc9ff6708),platform=Mac OS X 10.11.6 x86_64)
	from /Users/simonugor/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/response.rb:69:in `assert_ok'
	from /Users/simonugor/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/response.rb:32:in `initialize'
	from /Users/simonugor/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/http/common.rb:81:in `new'
	from /Users/simonugor/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/http/common.rb:81:in `create_response'
	from /Users/simonugor/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/http/default.rb:104:in `request'
	from /Users/simonugor/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
	from /Users/simonugor/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/bridge.rb:164:in `execute'
	from /Users/simonugor/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/bridge.rb:97:in `create_session'
	from /Users/simonugor/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/bridge.rb:53:in `handshake'
	from /Users/simonugor/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/chrome/driver.rb:46:in `initialize'
	from /Users/simonugor/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/common/driver.rb:44:in `new'
	from /Users/simonugor/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/common/driver.rb:44:in `for'
	from /Users/simonugor/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver.rb:84:in `for'
	from /Users/simonugor/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/watir-6.10.2/lib/watir/browser.rb:48:in `initialize'
	from (irb#1):3:in `new'
	from (irb#1):3



Can someone help me please? I am just a beginner.
Thank you

Is This A Good Question/Topic? 0
  • +

Replies To: Ruby with chromedriver

#2 NeoTifa   User is offline

  • NeoTifa Codebreaker, the Scourge of Devtester
  • member icon





Reputation: 4391
  • View blog
  • Posts: 18,831
  • Joined: 24-September 08

Re: Ruby with chromedriver

Posted 16 January 2018 - 01:22 PM

Most of my first debugging steps with the driver include making sure you have a compatible version for the version of Chrome you're using, then making sure it's in your Ruby/bin folder. It also looks like you're using 2.2.4, which I don't believe is supported anymore. If none of these helps, then I'm honestly at a loss because it might have something to do with it being a Mac, though I don't think this should be an issue.
Was This Post Helpful? 0
  • +
  • -

#3 simonugor   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 26-October 17

Re: Ruby with chromedriver

Posted 17 January 2018 - 10:31 AM

Thank you I am going to try to update chrome and chromedriver versions. One thing.. how to find my ruby/bin folder? Sorry for bad question Im just a beginner.
Thank you
Was This Post Helpful? 0
  • +
  • -

#4 NeoTifa   User is offline

  • NeoTifa Codebreaker, the Scourge of Devtester
  • member icon





Reputation: 4391
  • View blog
  • Posts: 18,831
  • Joined: 24-September 08

Re: Ruby with chromedriver

Posted 19 January 2018 - 03:20 PM

It should be in your C:/ folder, or where you installed your ruby. It will be called Ruby22 since you're using 2.2.0.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1