File tree Expand file tree Collapse file tree 5 files changed +18
-4
lines changed
examples/javascript/actionsApi
website_and_docs/content/documentation/webdriver/actions_api Expand file tree Collapse file tree 5 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,20 @@ suite(function(env) {
24
24
const textField = driver . findElement ( By . id ( "textInput" ) ) ;
25
25
assert . deepStrictEqual ( 'A' , await textField . getAttribute ( 'value' ) )
26
26
} ) ;
27
+
28
+ it ( 'KeyUp' , async function ( ) {
29
+ await driver . get ( 'https://www.selenium.dev/selenium/web/single_text_input.html' ) ;
30
+
31
+ await driver . actions ( )
32
+ . keyDown ( Key . SHIFT )
33
+ . sendKeys ( 'a' )
34
+ . keyUp ( Key . SHIFT )
35
+ . sendKeys ( "b" )
36
+ . perform ( ) ;
37
+
38
+ const textField = driver . findElement ( By . id ( "textInput" ) ) ;
39
+ assert . deepStrictEqual ( 'Ab' , await textField . getAttribute ( 'value' ) )
40
+ } ) ;
27
41
} ) ;
28
42
} ) ;
29
43
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ Use the [Java Keys enum](https://github.com/SeleniumHQ/selenium/blob/selenium-4.
82
82
{{< gh-codeblock path="examples/ruby/spec/actions_api/keys_spec.rb#L22-L27" >}}
83
83
{{< /tab >}}
84
84
{{< tab header="JavaScript" >}}
85
- // Add Code
85
+ {{< gh-codeblock path="examples/javascript/actionsApi/keysTest.js#L31-L36" >}}
86
86
{{< /tab >}}
87
87
{{< tab header="Kotlin" >}}
88
88
// Add Code
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ Use the [Java Keys enum](https://github.com/SeleniumHQ/selenium/blob/selenium-4.
82
82
{{< gh-codeblock path="examples/ruby/spec/actions_api/keys_spec.rb#L22-L27" >}}
83
83
{{< /tab >}}
84
84
{{< tab header="JavaScript" >}}
85
- // Add Code
85
+ {{< gh-codeblock path="examples/javascript/actionsApi/keysTest.js#L31-L36" >}}
86
86
{{< /tab >}}
87
87
{{< tab header="Kotlin" >}}
88
88
// Add Code
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ Use the [Java Keys enum](https://github.com/SeleniumHQ/selenium/blob/selenium-4.
82
82
{{< gh-codeblock path="examples/ruby/spec/actions_api/keys_spec.rb#L22-L27" >}}
83
83
{{< /tab >}}
84
84
{{< tab header="JavaScript" >}}
85
- // Add Code
85
+ {{< gh-codeblock path="examples/javascript/actionsApi/keysTest.js#L31-L36" >}}
86
86
{{< /tab >}}
87
87
{{< tab header="Kotlin" >}}
88
88
// Add Code
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ Use the [Java Keys enum](https://github.com/SeleniumHQ/selenium/blob/selenium-4.
82
82
{{< gh-codeblock path="examples/ruby/spec/actions_api/keys_spec.rb#L22-L27" >}}
83
83
{{< /tab >}}
84
84
{{< tab header="JavaScript" >}}
85
- // Add Code
85
+ {{< gh-codeblock path="examples/javascript/actionsApi/keysTest.js#L31-L36" >}}
86
86
{{< /tab >}}
87
87
{{< tab header="Kotlin" >}}
88
88
// Add Code
You can’t perform that action at this time.
0 commit comments