diff --git a/docs/src/writing-tests-java.md b/docs/src/writing-tests-java.md index 17b13d3f53..551426cca1 100644 --- a/docs/src/writing-tests-java.md +++ b/docs/src/writing-tests-java.md @@ -12,6 +12,7 @@ package org.example; import java.util.regex.Pattern; import com.microsoft.playwright.*; +import com.microsoft.playwright.options.AriaRole; import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat; @@ -26,7 +27,7 @@ public class App { assertThat(page).hasTitle(Pattern.compile("Playwright")); // create a locator - Locator getStarted = page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Get Started")) + Locator getStarted = page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Get Started")); // Expect an attribute "to be strictly equal" to the value. assertThat(getStarted).hasAttribute("href", "/docs/intro"); @@ -91,4 +92,4 @@ Page page = context.newPage(); - [Run single test, multiple tests, headed mode](./running-tests.md) - [Generate tests with Codegen](./codegen.md) -- [See a trace of your tests](./trace-viewer-intro.md) \ No newline at end of file +- [See a trace of your tests](./trace-viewer-intro.md)