Closed Bug 1446703 Opened 6 years ago Closed 6 years ago

WebDriver ruby API tries to call new for nil class in Selenium::WebDriver.for

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: jeffery, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180316021353

Steps to reproduce:

Firefox 59.0.1 (64-bit)
selenium-webdriver 3.11.0
geckodriver 0.20.0
Ubuntu 17.10 (64 bit)

Code (navigate.rb):

require 'selenium-webdriver'

driver = new Selenium::WebDriver.for :firefox  # error here line 3
driver.navigate.to 'http://google.com'
driver.quit





Actual results:

Uncaught exception: undefined method `new' for main:Object
	/home/jeffery/RubymineProjects/selenium/navigate.rb:3:in `<top (required)>'

Using RubyMine, it looks like the for method gets to its last step in driver.rb:

def initialize(bridge, listener: nil)
        @bridge = bridge
        @bridge = Support::EventFiringBridge.new(bridge, listener) if listener
end

The error occurs upon return from this  superclass constructor, which should return back through the stack to the original for method.  Everything to this point appears to be set up properly: geckodriver is started, the session request is successful, and  browser window appears.  It seems like the ruby stack is corrupted in some fashion.


Expected results:

A functional driver instance.
Also:  Ruby 2.5.0
This is not a bug tracker for the Ruby Selenium binding. You want to ask over there for support. Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.