|
12 | 12 | import org.openqa.selenium.bidi.LogInspector;
|
13 | 13 | import org.openqa.selenium.bidi.log.ConsoleLogEntry;
|
14 | 14 | import org.openqa.selenium.bidi.log.JavascriptLogEntry;
|
15 |
| -import org.openqa.selenium.bidi.log.LogLevel; |
| 15 | +//import org.openqa.selenium.bidi.log.LogLevel; |
16 | 16 | import org.openqa.selenium.bidi.log.StackTrace;
|
17 | 17 | import org.openqa.selenium.firefox.FirefoxDriver;
|
18 | 18 | import org.openqa.selenium.firefox.FirefoxOptions;
|
@@ -46,23 +46,23 @@ void testListenToConsoleLog() throws ExecutionException, InterruptedException, T
|
46 | 46 | }
|
47 | 47 | }
|
48 | 48 |
|
49 |
| - @Test |
50 |
| - void testListenToJavascriptLog() |
51 |
| - throws ExecutionException, InterruptedException, TimeoutException { |
52 |
| - try (LogInspector logInspector = new LogInspector(driver)) { |
53 |
| - CompletableFuture<JavascriptLogEntry> future = new CompletableFuture<>(); |
54 |
| - logInspector.onJavaScriptLog(future::complete); |
55 |
| - |
56 |
| - driver.get("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html"); |
57 |
| - driver.findElement(By.id("jsException")).click(); |
58 |
| - |
59 |
| - JavascriptLogEntry logEntry = future.get(5, TimeUnit.SECONDS); |
60 |
| - |
61 |
| - Assertions.assertEquals("Error: Not working", logEntry.getText()); |
62 |
| - Assertions.assertEquals("javascript", logEntry.getType()); |
63 |
| - Assertions.assertEquals(LogLevel.ERROR, logEntry.getLevel()); |
64 |
| - } |
65 |
| - } |
| 49 | +// @Test |
| 50 | +// void testListenToJavascriptLog() |
| 51 | +// throws ExecutionException, InterruptedException, TimeoutException { |
| 52 | +// try (LogInspector logInspector = new LogInspector(driver)) { |
| 53 | +// CompletableFuture<JavascriptLogEntry> future = new CompletableFuture<>(); |
| 54 | +// logInspector.onJavaScriptLog(future::complete); |
| 55 | +// |
| 56 | +// driver.get("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html"); |
| 57 | +// driver.findElement(By.id("jsException")).click(); |
| 58 | +// |
| 59 | +// JavascriptLogEntry logEntry = future.get(5, TimeUnit.SECONDS); |
| 60 | +// |
| 61 | +// Assertions.assertEquals("Error: Not working", logEntry.getText()); |
| 62 | +// Assertions.assertEquals("javascript", logEntry.getType()); |
| 63 | +// Assertions.assertEquals(LogLevel.ERROR, logEntry.getLevel()); |
| 64 | +// } |
| 65 | +// } |
66 | 66 |
|
67 | 67 | @Test
|
68 | 68 | void testListenToJavascriptErrorLog()
|
|
0 commit comments