diff --git a/README.md b/README.md index 54b078e1..4ebc2889 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Playwright is a Java library to automate [Chromium](https://www.chromium.org/Hom | | Linux | macOS | Windows | | :--- | :---: | :---: | :---: | -| Chromium 97.0.4666.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Chromium 97.0.4681.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | | WebKit 15.4 | ✅ | ✅ | ✅ | | Firefox 93.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | diff --git a/assertions/src/main/java/com/microsoft/playwright/assertions/PlaywrightAssertions.java b/assertions/src/main/java/com/microsoft/playwright/assertions/PlaywrightAssertions.java index a780acfc..95a124cb 100644 --- a/assertions/src/main/java/com/microsoft/playwright/assertions/PlaywrightAssertions.java +++ b/assertions/src/main/java/com/microsoft/playwright/assertions/PlaywrightAssertions.java @@ -28,7 +28,18 @@ import com.microsoft.playwright.impl.PageAssertionsImpl; * *
Consider the following example: *
{@code
- * assertThat(page.locator('.status')).hasText('Submitted');
+ * ...
+ * import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat;
+ *
+ * public class TestExample {
+ * ...
+ * @Test
+ * void statusBecomesSubmitted() {
+ * ...
+ * page.click("#submit-button");
+ * assertThat(page.locator(".status")).hasText("Submitted");
+ * }
+ * }
* }
*
* Playwright will be re-testing the node with the selector {@code .status} until fetched Node has the {@code "Submitted"} text. It @@ -36,6 +47,8 @@ import com.microsoft.playwright.impl.PageAssertionsImpl; * You can pass this timeout as an option. * *
By default, the timeout for assertions is set to 5 seconds. + * + *
To use Playwright assertions add the following dependency into the {@code pom.xml} of your Maven project: */ public interface PlaywrightAssertions { /** diff --git a/assertions/src/test/java/com/microsoft/playwright/TestLocatorAssertions.java b/assertions/src/test/java/com/microsoft/playwright/TestLocatorAssertions.java index b959e075..978c9b54 100644 --- a/assertions/src/test/java/com/microsoft/playwright/TestLocatorAssertions.java +++ b/assertions/src/test/java/com/microsoft/playwright/TestLocatorAssertions.java @@ -447,13 +447,13 @@ public class TestLocatorAssertions extends TestBase { void hasJSPropertyNumberFail() { page.setContent("