Skip to content

Commit bda48e9

Browse files
committed
[rb] fixes for travis tests
1 parent fa53697 commit bda48e9

4 files changed

Lines changed: 18 additions & 11 deletions

File tree

rb/lib/selenium/webdriver/remote/w3c_capabilities.rb

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,25 @@ module Remote
2525
# server is being asked to create.
2626
#
2727

28-
# TODO - Change values back from `nil` to `:any` when Firefox fixes this:
28+
# TODO - uncomment when Mozilla fixes this:
2929
# https://bugzilla.mozilla.org/show_bug.cgi?id=1326397
3030
class W3CCapabilities
3131
DEFAULTS = {
3232
browser_name: '',
33-
browser_version: nil,
34-
platform_name: nil,
35-
platform_version: nil,
36-
accept_insecure_certs: false,
33+
# browser_version: :any,
34+
# platform_name: :any,
35+
# platform_version: :any,
36+
# accept_insecure_certs: false,
3737
page_load_strategy: 'normal',
3838
proxy: nil
3939
}.freeze
4040

4141
KNOWN = [
42+
:browser_version,
43+
:platform_name,
44+
:platform_version,
45+
:accept_insecure_certs,
46+
4247
:remote_session_id,
4348
:accessibility_checks,
4449
:rotatable,
@@ -108,7 +113,7 @@ def json_create(data)
108113
caps.browser_version = data.delete('browserVersion')
109114
caps.platform_name = data.delete('platformName')
110115
caps.platform_version = data.delete('platformVersion')
111-
caps.accept_insecure_certs = data.delete('acceptInsecureCerts')
116+
caps.accept_insecure_certs = data.delete('acceptInsecureCerts') if data.key?('acceptInsecureCerts')
112117
caps.page_load_strategy = data.delete('pageLoadStrategy')
113118
timeouts = data.delete('timeouts')
114119
caps.implicit_timeout = timeouts['implicit'] if timeouts

rb/spec/integration/selenium/webdriver/mouse_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ module WebDriver
2626
describe Mouse do
2727
it 'clicks an element' do
2828
driver.navigate.to url_for('formPage.html')
29+
original_title = driver.title
2930
driver.mouse.click driver.find_element(id: 'imageButton')
31+
Wait.new.until { driver.title != original_title }
3032
expect(driver.title).to eq 'We Arrive Here'
3133
end
3234

rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ def initialize
2828
@create_driver_error = nil
2929
@create_driver_error_count = 0
3030

31-
@driver = (ENV['WD_SPEC_DRIVER'] || :remote).to_sym
31+
@driver = (ENV['WD_SPEC_DRIVER'] || :chrome).to_sym
3232
end
3333

3434
def browser
3535
if driver == :remote
36-
(ENV['WD_REMOTE_BROWSER'] || :safari).to_sym
36+
(ENV['WD_REMOTE_BROWSER'] || :chrome).to_sym
3737
else
3838
driver
3939
end

rb/spec/integration/selenium/webdriver/target_locator_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ module WebDriver
189189
end
190190

191191
# https://github.com/SeleniumHQ/selenium/issues/3339
192-
not_compliant_on driver: :remote, platform: :macosx do
192+
not_compliant_on driver: :remote do
193193
it 'should iterate over open windows when current window is closed' do
194194
driver.navigate.to url_for('xhtmlTest.html')
195195
wait_for_element(link: 'Create a new anonymous window')
@@ -214,8 +214,8 @@ module WebDriver
214214
end
215215

216216
not_compliant_on browser: :safari do
217-
# TODO - File bug report / investigate
218-
not_compliant_on driver: :remote, platform: :macosx do
217+
# https://github.com/SeleniumHQ/selenium/issues/3339
218+
not_compliant_on driver: :remote do
219219
it 'should switch to a window and execute a block when current window is closed' do
220220
driver.navigate.to url_for('xhtmlTest.html')
221221
driver.find_element(link: 'Open new window').click

0 commit comments

Comments
 (0)