@@ -24,31 +24,37 @@ module WebDriver
24
24
# Firefox - "Actions Endpoint Not Yet Implemented"
25
25
not_compliant_on browser : [ :safari , :ff_legacy , :firefox ] do
26
26
describe Keyboard do
27
- it 'sends keys to the active element' do
28
- driver . navigate . to url_for ( 'bodyTypingTest.html' )
27
+ # Edge - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8339952
28
+ not_compliant_on browser : :edge do
29
+ it 'sends keys to the active element' do
30
+ driver . navigate . to url_for ( 'bodyTypingTest.html' )
29
31
30
- driver . keyboard . send_keys 'ab'
32
+ driver . keyboard . send_keys 'ab'
31
33
32
- text = driver . find_element ( id : 'body_result' ) . text . strip
33
- expect ( text ) . to eq ( 'keypress keypress' )
34
+ text = driver . find_element ( id : 'body_result' ) . text . strip
35
+ expect ( text ) . to eq ( 'keypress keypress' )
34
36
35
- expect ( driver . find_element ( id : 'result' ) . text . strip ) . to be_empty
37
+ expect ( driver . find_element ( id : 'result' ) . text . strip ) . to be_empty
38
+ end
36
39
end
37
40
38
- it 'can send keys with shift pressed' do
39
- driver . navigate . to url_for ( 'javascriptPage.html' )
41
+ # Edge - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8339952
42
+ not_compliant_on browser : :edge do
43
+ it 'can send keys with shift pressed' do
44
+ driver . navigate . to url_for ( 'javascriptPage.html' )
40
45
41
- event_input = driver . find_element ( id : 'theworks' )
42
- keylogger = driver . find_element ( id : 'result' )
46
+ event_input = driver . find_element ( id : 'theworks' )
47
+ keylogger = driver . find_element ( id : 'result' )
43
48
44
- driver . mouse . click event_input
49
+ driver . mouse . click event_input
45
50
46
- driver . keyboard . press :shift
47
- driver . keyboard . send_keys 'ab'
48
- driver . keyboard . release :shift
51
+ driver . keyboard . press :shift
52
+ driver . keyboard . send_keys 'ab'
53
+ driver . keyboard . release :shift
49
54
50
- expect ( event_input . attribute ( :value ) ) . to eq ( 'AB' )
51
- expect ( keylogger . text . strip ) . to match ( /^(focus )?keydown keydown keypress keyup keydown keypress keyup keyup$/ )
55
+ expect ( event_input . attribute ( :value ) ) . to eq ( 'AB' )
56
+ expect ( keylogger . text . strip ) . to match ( /^(focus )?keydown keydown keypress keyup keydown keypress keyup keyup$/ )
57
+ end
52
58
end
53
59
54
60
it 'raises an ArgumentError if the pressed key is not a modifier key' do
0 commit comments