Skip to content

Commit

Permalink
rb - w3c updates
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Mar 13, 2016
1 parent 9eb5e30 commit 02cfa9a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ task :test_rb => [
"//rb:remote-chrome-test",
"//rb:remote-firefox-test",
"//rb:remote-phantomjs-test",
("//rb:marionette-test" if ENV['MARIONETTE_PATH']),
("//rb:remote-marionette-test" if ENV['MARIONETTE_PATH']),
"//rb:marionette-test",
"//rb:remote-marionette-test",
("//rb:safari-test" if mac?),
("//rb:remote-safari-test" if mac?),
("//rb:ie-test" if windows?),
Expand Down
2 changes: 1 addition & 1 deletion rb/lib/selenium/webdriver/remote/w3c_capabilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def json_create(data)
caps.takes_element_screenshot = data.delete("takesElementScreenshot") if data.key? "takesElementScreenshot"
caps.page_load_strategy = data.delete("pageLoadStrategy") if data.key? "pageloadStrategy"
proxy = data.delete('proxy')
caps.proxy = Proxy.json_create(proxy) unless proxy.empty?
caps.proxy = Proxy.json_create(proxy) unless proxy.nil? || proxy.empty?

# Remote Server Specific
caps[:remote_session_id] = data.delete('webdriver.remote.sessionid')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,12 @@ def restart_remote_server(path = nil)
compliant_on :browser => :marionette do
# This passes in isolation, but can not run in suite due to combination of
# https://bugzilla.mozilla.org/show_bug.cgi?id=1228107 & https://github.com/SeleniumHQ/selenium/issues/1150
not_compliant_on :driver => :remote do
it "Uses Wires when setting marionette option in driver initialization" do
@opt[:marionette] = true
driver1 = Selenium::WebDriver.for GlobalTestEnv.driver, @opt
it "Uses Wires when setting marionette option in driver initialization" do
@opt[:marionette] = true
driver1 = Selenium::WebDriver.for GlobalTestEnv.driver, @opt

expect(driver1.capabilities[:takes_element_screenshot]).to_not be_nil
driver1.quit
end
expect(driver1.capabilities[:takes_element_screenshot]).to_not be_nil
driver1.quit
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def create_firefox_driver
end

def create_marionette_driver
binary = ENV['MARIONETTE_BINARY']
binary = ENV['FIREFOX_BINARY']
WebDriver::Firefox.path = binary if binary

WebDriver.for :firefox, :marionette => true
Expand Down
9 changes: 6 additions & 3 deletions rb/spec/integration/selenium/webdriver/target_locator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@

# https://github.com/jgraham/wires/issues/52
not_compliant_on :browser => :marionette do
it "should find the active element" do
driver.navigate.to url_for("xhtmlTest.html")
expect(driver.switch_to.active_element).to be_an_instance_of(WebDriver::Element)
# https://github.com/SeleniumHQ/selenium/issues/1795
not_compliant_on :driver => :remote, :browser => [:edge, :marionette] do
it "should find the active element" do
driver.navigate.to url_for("xhtmlTest.html")
expect(driver.switch_to.active_element).to be_an_instance_of(WebDriver::Element)
end
end
end

Expand Down

0 comments on commit 02cfa9a

Please sign in to comment.