File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
javascript/node/selenium-webdriver/test/bidi Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,23 @@ suite(
84
84
assert . notEqual ( result . result . value . context , null )
85
85
} )
86
86
87
+ it ( 'can call function to get element' , async function ( ) {
88
+ await driver . get ( Pages . logEntryAdded )
89
+ const id = await driver . getWindowHandle ( )
90
+ const manager = await ScriptManager ( id , driver )
91
+
92
+ const result = await manager . callFunctionInBrowsingContext (
93
+ id ,
94
+ '() => document.getElementById(\"consoleLog\")' ,
95
+ false
96
+ )
97
+ assert . equal ( result . resultType , EvaluateResultType . SUCCESS )
98
+ assert . notEqual ( result . realmId , null )
99
+ assert . equal ( result . result . type , 'node' )
100
+ assert . notEqual ( result . result . value , null )
101
+ assert . notEqual ( result . result . value . nodeType , null )
102
+ } )
103
+
87
104
it ( 'can call function with arguments' , async function ( ) {
88
105
const id = await driver . getWindowHandle ( )
89
106
const manager = await ScriptManager ( id , driver )
You can’t perform that action at this time.
0 commit comments