You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.
This is sort of a tl;dr ticket for http://code.google.com/p/selenium/issues/detail?id=3075
, but:
The following code:
profile = Selenium::WebDriver::Firefox::Profile.new
# See http://code.google.com/p/selenium/issues/detail?id=3154
profile['toolkit.telemetry.prompted'] = 2
profile['toolkit.telemetry.rejected'] = true
caps = Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_profile =>
profile)
@driver = Selenium::WebDriver.for( :remote, :url => "http://localhost:#{@port}/wd/hub",
:desired_capabilities => caps)
causes firefox to run without native events. This code uses native events:
@driver = Selenium::WebDriver.for( :remote, :url => "http://localhost:#{@port}/wd/hub",
:desired_capabilities => @browser.to_sym )
As does this:
profile = Selenium::WebDriver::Firefox::Profile.new
print "profile: #{profile.inspect}\n"
# See http://code.google.com/p/selenium/issues/detail?id=3154
profile['toolkit.telemetry.prompted'] = '2'
profile['toolkit.telemetry.rejected'] = 'true'
profile.native_events = true
print "profile: #{profile.inspect}\n"
caps = Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_profile =>
profile,
:browser_name
=> "firefox",
:javascript_enabled
=> true,
:takes_screenshot
=> true,
:css_selectors_enabled
=> true,
:native_events
=> true
)
@driver = Selenium::WebDriver.for( :remote, :url => "http://localhost:#{@port}/wd/hub",
:desired_capabilities => caps)
Note that in that last one, the important line is " profile.native_events = true";
with that commented out, things break again.
So, apparently Selenium::WebDriver::Firefox::Profile.new defaults to native events
off, but having no profile with the remote driver defaults to them on. That is, to
put it mildly, *surprising*, especially since there's no obvious indicator as to whether
we're in native event mode or not.
-Robin
Reported by robinleepowell on 2012-01-07 02:55:58
The text was updated successfully, but these errors were encountered:
On linux systems default is to not use native events.
To get information about current mode one should check browser capabilities that can
be obtained by @driver.capabilities property
Originally reported on Google Code with ID 3163
Reported by
robinleepowell
on 2012-01-07 02:55:58The text was updated successfully, but these errors were encountered: