Commit 2443d5a 1 parent e8e5771 commit 2443d5a Copy full SHA for 2443d5a
File tree 2 files changed +8
-3
lines changed
src/org/openqa/selenium/bidi
test/org/openqa/selenium/bidi
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -95,10 +95,15 @@ private void initializeLogListener() {
95
95
}
96
96
}
97
97
98
+ @ Deprecated
98
99
public void onConsoleLog (Consumer <ConsoleLogEntry > consumer ) {
99
100
consoleLogListeners .add (consumer );
100
101
}
101
102
103
+ public void onConsoleEntry (Consumer <ConsoleLogEntry > consumer ) {
104
+ consoleLogListeners .add (consumer );
105
+ }
106
+
102
107
public void onJavaScriptLog (Consumer <JavascriptLogEntry > consumer ) {
103
108
jsLogListeners .add (consumer );
104
109
}
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ public void setUp() {
64
64
void canListenToConsoleLog () throws ExecutionException , InterruptedException , TimeoutException {
65
65
try (LogInspector logInspector = new LogInspector (driver )) {
66
66
CompletableFuture <ConsoleLogEntry > future = new CompletableFuture <>();
67
- logInspector .onConsoleLog (future ::complete );
67
+ logInspector .onConsoleEntry (future ::complete );
68
68
69
69
page = server .whereIs ("/bidi/logEntryAdded.html" );
70
70
driver .get (page );
@@ -148,7 +148,7 @@ void canListenToConsoleLogForABrowsingContext()
148
148
149
149
try (LogInspector logInspector = new LogInspector (browsingContextId , driver )) {
150
150
CompletableFuture <ConsoleLogEntry > future = new CompletableFuture <>();
151
- logInspector .onConsoleLog (future ::complete );
151
+ logInspector .onConsoleEntry (future ::complete );
152
152
153
153
driver .get (page );
154
154
driver .findElement (By .id ("consoleLog" )).click ();
@@ -224,7 +224,7 @@ void canListenToConsoleLogForMultipleBrowsingContexts()
224
224
CountDownLatch latch = new CountDownLatch (2 );
225
225
226
226
try (LogInspector logInspector = new LogInspector (browsingContextIds , driver )) {
227
- logInspector .onConsoleLog (logEntry -> latch .countDown ());
227
+ logInspector .onConsoleEntry (logEntry -> latch .countDown ());
228
228
229
229
driver .get (page );
230
230
// Triggers console event in the second tab
You can’t perform that action at this time.
0 commit comments