1
0
mirror of synced 2026-07-07 00:50:01 +00:00

chore: roll driver (#681)

This commit is contained in:
Yury Semikhatsky
2021-11-01 11:31:09 -07:00
committed by GitHub
parent 5d7ee12f4a
commit 44a85c1dc3
5 changed files with 20 additions and 7 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ Playwright is a Java library to automate [Chromium](https://www.chromium.org/Hom
| | Linux | macOS | Windows |
| :--- | :---: | :---: | :---: |
| Chromium <!-- GEN:chromium-version -->97.0.4666.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Chromium <!-- GEN:chromium-version -->97.0.4681.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| WebKit <!-- GEN:webkit-version -->15.4<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Firefox <!-- GEN:firefox-version -->93.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
@@ -28,7 +28,18 @@ import com.microsoft.playwright.impl.PageAssertionsImpl;
*
* <p> Consider the following example:
* <pre>{@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");
* }
* }
* }</pre>
*
* <p> 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.
*
* <p> By default, the timeout for assertions is set to 5 seconds.
*
* <p> To use Playwright assertions add the following dependency into the {@code pom.xml} of your Maven project:
*/
public interface PlaywrightAssertions {
/**
@@ -447,13 +447,13 @@ public class TestLocatorAssertions extends TestBase {
void hasJSPropertyNumberFail() {
page.setContent("<div id=node>Text content</div>");
Locator locator = page.locator("#node");
page.evalOnSelector("div", "e => e.foo = { a: 1, b: 'string' }");
page.evalOnSelector("div", "e => e.foo = 2021");
try {
assertThat(locator).hasJSProperty("foo", 1, new LocatorAssertions.HasJSPropertyOptions().setTimeout(1000));
fail("did not throw");
} catch (AssertionFailedError e) {
assertEquals("1", e.getExpected().getStringRepresentation());
assertEquals("{a=1, b=string}", e.getActual().getStringRepresentation());
assertEquals("2021", e.getActual().getStringRepresentation());
assertTrue(e.getMessage().contains("Locator expected to have JavaScript property 'foo'"), e.getMessage());
}
}
@@ -474,7 +474,6 @@ public class TestLocatorAssertions extends TestBase {
}
@Test
@Disabled("https://github.com/microsoft/playwright/pull/9865")
void hasJSPropertyStringFail() {
page.setContent("<div id=node>Text content</div>");
Locator locator = page.locator("#node");
@@ -485,9 +484,9 @@ public class TestLocatorAssertions extends TestBase {
assertEquals("foo", e.getExpected().getStringRepresentation());
assertEquals("node", e.getActual().getStringRepresentation());
assertTrue(e.getMessage().contains("Locator expected to have JavaScript property 'id'"), e.getMessage());
throw e;
}
}
@Test
void hasValueTextPass() {
page.setContent("<input id=node></input>");
@@ -34,6 +34,7 @@ class TracingImpl implements Tracing {
private void stopChunkImpl(Path path) {
JsonObject params = new JsonObject();
params.addProperty("save", path != null);
params.addProperty("skipCompress", false);
JsonObject json = context.sendMessage("tracingStopChunk", params).getAsJsonObject();
if (!json.has("artifact")) {
return;
+1 -1
View File
@@ -1 +1 @@
1.17.0-next-1635196647000
1.17.0-next-1635526444000