Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs: fix java console message snippet (#20171)
Yury Semikhatskyc36827433dd3
diff --git a/docs/src/api/class-consolemessage.md b/docs/src/api/class-consolemessage.mdindex c415332577..19b8579fa6 100644--- a/docs/src/api/class-consolemessage.md+++ b/docs/src/api/class-consolemessage.md@@ -28,16 +28,16 @@ await msg.args[1].jsonValue() // 42``````java-// Listen for all System.out.printlns+// Listen for all console messages and print them to the standard output.page.onConsoleMessage(msg -> System.out.println(msg.text()));-// Listen for all console events and handle errors+// Listen for all console messages and print errors to the standard output.page.onConsoleMessage(msg -> {if ("error".equals(msg.type()))System.out.println("Error text: " + msg.text());});-// Get the next System.out.println+// Get the next console messageConsoleMessage msg = page.waitForConsoleMessage(() -> {// Issue console.log inside the pagepage.evaluate("console.log('hello', 42, { foo: 'bar' });");