Skip to content

Commit 18ad7d8

Browse files
committed
try to fix remote
1 parent 2ccc6db commit 18ad7d8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

java/test/org/openqa/selenium/bidi/emulation/EmulationTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ class EmulationTest extends JupiterTestBase {
4040
Object getBrowserGeolocation(WebDriver driver, String userContext) {
4141
JavascriptExecutor executor = (JavascriptExecutor) driver;
4242

43+
BrowsingContext context = new BrowsingContext(driver, driver.getWindowHandle());
44+
String url = appServer.whereIs("blank.html");
45+
context.navigate(url, ReadinessState.COMPLETE);
46+
driver.switchTo().window(context.getId());
47+
4348
Permission permission = new Permission(driver);
4449
var origin = executor.executeScript("return window.location.origin;");
4550
String originValue = (String) origin;

0 commit comments

Comments
 (0)