File tree 2 files changed +3
-12
lines changed
2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change 17
17
// under the License.
18
18
// </copyright>
19
19
20
- using OpenQA . Selenium . BiDi . Modules . BrowsingContext ;
21
20
using System ;
22
21
using System . Threading . Tasks ;
23
22
@@ -44,13 +43,4 @@ public static async Task<BiDi> AsBiDiAsync(this IWebDriver webDriver)
44
43
45
44
return bidi ;
46
45
}
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
- }
56
46
}
Original file line number Diff line number Diff line change @@ -44,8 +44,9 @@ public async Task BiDiSetUp()
44
44
45
45
driver = EnvironmentManager . Instance . CreateDriverInstance ( options ) ;
46
46
47
- context = await driver . AsBiDiContextAsync ( ) ;
48
- bidi = context . BiDi ;
47
+ bidi = await driver . AsBiDiAsync ( ) ;
48
+
49
+ context = ( await bidi . BrowsingContext . GetTreeAsync ( ) ) [ 0 ] . Context ;
49
50
}
50
51
51
52
[ TearDown ]
You can’t perform that action at this time.
0 commit comments