File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change 1717// under the License.
1818// </copyright>
1919
20- using OpenQA . Selenium . BiDi . Modules . BrowsingContext ;
2120using System ;
2221using System . Threading . Tasks ;
2322
@@ -44,13 +43,4 @@ public static async Task<BiDi> AsBiDiAsync(this IWebDriver webDriver)
4443
4544 return bidi ;
4645 }
47-
48- public static async Task < BrowsingContext > AsBiDiContextAsync ( this IWebDriver webDriver )
49- {
50- var bidi = await webDriver . AsBiDiAsync ( ) ;
51-
52- var currentBrowsingContext = new BrowsingContext ( bidi , webDriver . CurrentWindowHandle ) ;
53-
54- return currentBrowsingContext ;
55- }
5646}
Original file line number Diff line number Diff line change @@ -44,8 +44,9 @@ public async Task BiDiSetUp()
4444
4545 driver = EnvironmentManager . Instance . CreateDriverInstance ( options ) ;
4646
47- context = await driver . AsBiDiContextAsync ( ) ;
48- bidi = context . BiDi ;
47+ bidi = await driver . AsBiDiAsync ( ) ;
48+
49+ context = ( await bidi . BrowsingContext . GetTreeAsync ( ) ) [ 0 ] . Context ;
4950 }
5051
5152 [ TearDown ]
You can’t perform that action at this time.
0 commit comments