File tree 2 files changed +17
-0
lines changed
javascript/node/selenium-webdriver/test/bidi
2 files changed +17
-0
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -67,6 +67,23 @@ suite(
67
67
assert . equal ( result . result . value , 3 )
68
68
} )
69
69
70
+ it ( 'can call function to get iframe browsing context' , async function ( ) {
71
+ await driver . get ( Pages . iframePage )
72
+ const id = await driver . getWindowHandle ( )
73
+ const manager = await ScriptManager ( id , driver )
74
+
75
+ const result = await manager . callFunctionInBrowsingContext (
76
+ id ,
77
+ '() => document.querySelector(\'iframe[id="iframe1"]\').contentWindow' ,
78
+ false
79
+ )
80
+ assert . equal ( result . resultType , EvaluateResultType . SUCCESS )
81
+ assert . notEqual ( result . realmId , null )
82
+ assert . equal ( result . result . type , 'window' )
83
+ assert . notEqual ( result . result . value , null )
84
+ assert . notEqual ( result . result . value . context , null )
85
+ } )
86
+
70
87
it ( 'can call function with arguments' , async function ( ) {
71
88
const id = await driver . getWindowHandle ( )
72
89
const manager = await ScriptManager ( id , driver )
You can’t perform that action at this time.
0 commit comments