Skip to content

Commit 62ff9d3

Browse files
committed
rb - updates for edge support
1 parent 9e68025 commit 62ff9d3

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

rb/lib/selenium/webdriver/edge/legacy_support.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ module WebDriver
2222
module Edge
2323
module LegacySupport
2424
# These are commands Edge is still using from JSON Wire Protocol
25-
%i[executeScript, executeAsyncScript, submitElement, doubleClick,
26-
mouseDown, mouseUp, mouseMoveTo, click,
27-
sendKeysToActiveElement, getWindowHandles, getCurrentWindowHandle,
28-
getWindowSize, setWindowSize, getWindowPosition, setWindowPosition,
29-
maximizeWindow, getAlertText, acceptAlert, dismissAlert].each do |cmd|
25+
%i[executeScript executeAsyncScript submitElement doubleClick
26+
mouseDown mouseUp mouseMoveTo click
27+
sendKeysToActiveElement getWindowHandles getCurrentWindowHandle
28+
getWindowSize setWindowSize getWindowPosition setWindowPosition
29+
maximizeWindow getAlertText acceptAlert dismissAlert].each do |cmd|
3030
jwp = Remote::Bridge::COMMANDS[cmd]
3131
Remote::W3CBridge.command(cmd, jwp.first, jwp.last)
3232
end

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,14 @@ module WebDriver
4646
expect(text).to eq('Dropped!')
4747
end
4848

49-
# Edge BUG - https://connect.microsoft.com/IE/feedback/details/1850023
50-
not_compliant_on browser: :edge do
51-
it 'double clicks an element' do
52-
driver.navigate.to url_for('javascriptPage.html')
53-
element = driver.find_element(id: 'doubleClickField')
49+
it 'double clicks an element' do
50+
driver.navigate.to url_for('javascriptPage.html')
51+
element = driver.find_element(id: 'doubleClickField')
5452

55-
driver.mouse.double_click element
53+
driver.mouse.double_click element
5654

57-
wait(5).until do
58-
element.attribute(:value) == 'DoubleClicked'
59-
end
55+
wait(5).until do
56+
element.attribute(:value) == 'DoubleClicked'
6057
end
6158
end
6259

rb/spec/integration/selenium/webdriver/options_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ module WebDriver
7474
expect(cookies.first[:value]).to eq('bar')
7575
end
7676

77-
# Edge BUG - https://connect.microsoft.com/IE/feedbackdetail/view/1864122
77+
# Edge BUG - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/5751773/
7878
not_compliant_on browser: :edge do
7979
it 'should delete one' do
8080
driver.navigate.to url_for('xhtmlTest.html')
@@ -84,7 +84,7 @@ module WebDriver
8484
end
8585
end
8686

87-
# This is not a w3c supported spec
87+
# Edge BUG - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/5751773/
8888
not_compliant_on browser: :edge do
8989
it 'should delete all' do
9090
driver.navigate.to url_for('xhtmlTest.html')

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

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -320,24 +320,27 @@ module WebDriver
320320
end
321321

322322
compliant_on browser: :ie do
323-
describe 'basic auth alerts' do
324-
after { reset_driver! }
323+
# Windows 10 changed the auth alert
324+
not_compliant_on browser: :ie do
325+
describe 'basic auth alerts' do
326+
after { reset_driver! }
325327

326-
it 'allows the user to send valid credentials to an alert' do
327-
driver.navigate.to url_for('basicAuth')
328-
driver.switch_to.alert.authenticate('test', 'test')
328+
it 'allows the user to send valid credentials to an alert' do
329+
driver.navigate.to url_for('basicAuth')
330+
driver.switch_to.alert.authenticate('test', 'test')
329331

330-
expect(driver.find_element(tag_name: 'h1').text).to eq('authorized')
331-
end
332+
expect(driver.find_element(tag_name: 'h1').text).to eq('authorized')
333+
end
332334

333-
it 'does not raise an error when invalid credentials are used' do
334-
driver.navigate.to url_for('basicAuth')
335-
driver.switch_to.alert.authenticate('invalid', 'invalid')
335+
it 'does not raise an error when invalid credentials are used' do
336+
driver.navigate.to url_for('basicAuth')
337+
driver.switch_to.alert.authenticate('invalid', 'invalid')
336338

337-
wait = Selenium::WebDriver::Wait.new(timeout: 5, ignore: Selenium::WebDriver::Error::NoSuchAlertError)
338-
wait.until { driver.switch_to.alert }
339+
wait = Selenium::WebDriver::Wait.new(timeout: 5, ignore: Selenium::WebDriver::Error::NoSuchAlertError)
340+
wait.until { driver.switch_to.alert }
339341

340-
expect { driver.switch_to.alert.dismiss }.to_not raise_error
342+
expect { driver.switch_to.alert.dismiss }.to_not raise_error
343+
end
341344
end
342345
end
343346
end

0 commit comments

Comments
 (0)