File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
javascript/node/selenium-webdriver/test/bidi Expand file tree Collapse file tree 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(
6767 assert . equal ( result . result . value , 3 )
6868 } )
6969
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+
7087 it ( 'can call function with arguments' , async function ( ) {
7188 const id = await driver . getWindowHandle ( )
7289 const manager = await ScriptManager ( id , driver )
You can’t perform that action at this time.
0 commit comments