File tree Expand file tree Collapse file tree
src/org/openqa/selenium/bidi
test/org/openqa/selenium/bidi Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,10 +95,15 @@ private void initializeLogListener() {
9595 }
9696 }
9797
98+ @ Deprecated
9899 public void onConsoleLog (Consumer <ConsoleLogEntry > consumer ) {
99100 consoleLogListeners .add (consumer );
100101 }
101102
103+ public void onConsoleEntry (Consumer <ConsoleLogEntry > consumer ) {
104+ consoleLogListeners .add (consumer );
105+ }
106+
102107 public void onJavaScriptLog (Consumer <JavascriptLogEntry > consumer ) {
103108 jsLogListeners .add (consumer );
104109 }
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ public void setUp() {
6464 void canListenToConsoleLog () throws ExecutionException , InterruptedException , TimeoutException {
6565 try (LogInspector logInspector = new LogInspector (driver )) {
6666 CompletableFuture <ConsoleLogEntry > future = new CompletableFuture <>();
67- logInspector .onConsoleLog (future ::complete );
67+ logInspector .onConsoleEntry (future ::complete );
6868
6969 page = server .whereIs ("/bidi/logEntryAdded.html" );
7070 driver .get (page );
@@ -148,7 +148,7 @@ void canListenToConsoleLogForABrowsingContext()
148148
149149 try (LogInspector logInspector = new LogInspector (browsingContextId , driver )) {
150150 CompletableFuture <ConsoleLogEntry > future = new CompletableFuture <>();
151- logInspector .onConsoleLog (future ::complete );
151+ logInspector .onConsoleEntry (future ::complete );
152152
153153 driver .get (page );
154154 driver .findElement (By .id ("consoleLog" )).click ();
@@ -224,7 +224,7 @@ void canListenToConsoleLogForMultipleBrowsingContexts()
224224 CountDownLatch latch = new CountDownLatch (2 );
225225
226226 try (LogInspector logInspector = new LogInspector (browsingContextIds , driver )) {
227- logInspector .onConsoleLog (logEntry -> latch .countDown ());
227+ logInspector .onConsoleEntry (logEntry -> latch .countDown ());
228228
229229 driver .get (page );
230230 // Triggers console event in the second tab
You can’t perform that action at this time.
0 commit comments