Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: Worker.waitForConsoleMessage in java (#38385)

Yury Semikhatsky39584775618f
diff --git a/docs/src/api/class-worker.md b/docs/src/api/class-worker.md
index bd41abc1cd..5fc5992aff 100644
--- a/docs/src/api/class-worker.md
+++ b/docs/src/api/class-worker.md
@@ -130,6 +130,25 @@ Performs action and waits for the Worker to close.
### param: Worker.waitForClose.callback = %%-java-wait-for-event-callback-%%
* since: v1.9
+## async method: Worker.waitForConsoleMessage
+* since: v1.57
+* langs: java
+- returns: <[ConsoleMessage]>
+
+Performs action and waits for a console message.
+
+### option: Worker.waitForConsoleMessage.predicate
+* since: v1.57
+- `predicate` <[function]\([ConsoleMessage]\):[boolean]>
+
+Receives the [ConsoleMessage] object and resolves to true when the waiting should resolve.
+
+### option: Worker.waitForConsoleMessage.timeout = %%-wait-for-event-timeout-%%
+* since: v1.57
+
+### param: Worker.waitForConsoleMessage.callback = %%-java-wait-for-event-callback-%%
+* since: v1.57
+
## async method: Worker.waitForEvent
* since: v1.57
* langs: js, python