Skip to content

Commit 36d36e5

Browse files
committed
fix json reading
1 parent 108f5c6 commit 36d36e5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ enum EventType {
104104
clock = new ClockImpl(this);
105105
closePromise = new WaitableEvent<>(listeners, EventType.CLOSE);
106106

107-
String url = initializer.getAsJsonObject("options").get("baseUrl").getAsString();
107+
JsonElement url = initializer.getAsJsonObject("options").get("baseUrl");
108108
if (url != null) {
109109
try {
110-
this.baseUrl = new URL(url);
110+
this.baseUrl = new URL(url.getAsString());
111111
} catch (MalformedURLException e) {
112112
}
113113
}

playwright/src/test/java/com/microsoft/playwright/TestPageEmulateMedia.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import static com.microsoft.playwright.options.Media.PRINT;
3030
import static com.microsoft.playwright.Utils.attachFrame;
3131
import static org.junit.jupiter.api.Assertions.assertEquals;
32-
import static org.junit.jupiter.api.Assertions.assertTrue;
3332

3433
public class TestPageEmulateMedia extends TestBase {
3534
@Test

0 commit comments

Comments
 (0)