Skip to content

Commit f72fc73

Browse files
committed
[rb] release_actions guard for w3c non-compliant browsers
1 parent d320a21 commit f72fc73

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

rb/spec/integration/selenium/webdriver/action_builder_spec.rb

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,23 @@ module WebDriver
108108
end
109109
end
110110

111-
it 'can release pressed keys via release action' do
112-
driver.navigate.to url_for('javascriptPage.html')
111+
compliant_on driver: :ff_nightly do
112+
it 'can release pressed keys via release action' do
113+
driver.navigate.to url_for('javascriptPage.html')
113114

114-
event_input = driver.find_element(id: 'theworks')
115-
keylogger = driver.find_element(id: 'result')
115+
event_input = driver.find_element(id: 'theworks')
116+
keylogger = driver.find_element(id: 'result')
116117

117-
event_input.click
118+
event_input.click
118119

119-
driver.action.key_down(:shift).perform
120-
wait.until { keylogger.text.include? 'down' }
121-
expect(keylogger.text).to match(/keydown *$/)
120+
driver.action.key_down(:shift).perform
121+
wait.until { keylogger.text.include? 'down' }
122+
expect(keylogger.text).to match(/keydown *$/)
122123

123-
driver.action.release_actions
124-
wait.until { keylogger.text.include? 'up' }
125-
expect(keylogger.text).to match(/keyup *$/)
124+
driver.action.release_actions
125+
wait.until { keylogger.text.include? 'up' }
126+
expect(keylogger.text).to match(/keyup *$/)
127+
end
126128
end
127129
end # Key actions
128130

0 commit comments

Comments
 (0)