Automation IDE
Playwright
Java
Cloud browser · recorded
Sign in to run
Run
Ctrl
↵
Explorer
Code
Console
ExampleTest.java
13
Reset
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import com.microsoft.playwright.*; import org.junit.jupiter.api.*; import java.util.regex.Pattern; import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat; class ExampleTest { static Playwright playwright; static Browser browser; Page page; @BeforeAll static void launch() { playwright = Playwright.create(); browser = playwright.chromium().launch(); } @BeforeEach void newPage() { page = browser.newPage(); } @Test void hasTitle() { page.navigate("https://playwright.dev/"); assertThat(page).hasTitle(Pattern.compile("Playwright")); } @AfterAll static void close() { playwright.close(); } }
Test result
Console
Network
Console is empty
Logs, navigations and assertion output stream here while your code runs.