Compare commits
4 Commits
v1.62.0
...
release-1.28
| Author | SHA1 | Date | |
|---|---|---|---|
| 71ea72ba53 | |||
| 7d69f7a087 | |||
| 04158db747 | |||
| e47d0ab16c |
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.microsoft.playwright</groupId>
|
<groupId>com.microsoft.playwright</groupId>
|
||||||
<artifactId>parent-pom</artifactId>
|
<artifactId>parent-pom</artifactId>
|
||||||
<version>1.28.0-SNAPSHOT</version>
|
<version>1.28.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>driver-bundle</artifactId>
|
<artifactId>driver-bundle</artifactId>
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.microsoft.playwright</groupId>
|
<groupId>com.microsoft.playwright</groupId>
|
||||||
<artifactId>parent-pom</artifactId>
|
<artifactId>parent-pom</artifactId>
|
||||||
<version>1.28.0-SNAPSHOT</version>
|
<version>1.28.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>driver</artifactId>
|
<artifactId>driver</artifactId>
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>org.example</groupId>
|
<groupId>org.example</groupId>
|
||||||
<artifactId>examples</artifactId>
|
<artifactId>examples</artifactId>
|
||||||
<version>1.28.0-SNAPSHOT</version>
|
<version>1.28.1</version>
|
||||||
<name>Playwright Client Examples</name>
|
<name>Playwright Client Examples</name>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.microsoft.playwright</groupId>
|
<groupId>com.microsoft.playwright</groupId>
|
||||||
<artifactId>parent-pom</artifactId>
|
<artifactId>parent-pom</artifactId>
|
||||||
<version>1.28.0-SNAPSHOT</version>
|
<version>1.28.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>playwright</artifactId>
|
<artifactId>playwright</artifactId>
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ class LocatorImpl implements Locator {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Locator getByRole(AriaRole role, GetByRoleOptions options) {
|
public Locator getByRole(AriaRole role, GetByRoleOptions options) {
|
||||||
return null;
|
return locator(getByRoleSelector(role, options));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -171,4 +171,12 @@ public class TestSelectorsGetBy extends TestBase {
|
|||||||
asList("<a href=\"https://playwright.dev\">he llo 56</a>"),
|
asList("<a href=\"https://playwright.dev\">he llo 56</a>"),
|
||||||
page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName(" he \n llo 56 ").setExact(true)).evaluateAll("els => els.map(e => e.outerHTML)"));
|
page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName(" he \n llo 56 ").setExact(true)).evaluateAll("els => els.map(e => e.outerHTML)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void locatorGetByRole() {
|
||||||
|
page.setContent("<div><button>Click me</button></div>");
|
||||||
|
assertEquals(
|
||||||
|
asList("<button>Click me</button>"),
|
||||||
|
page.locator("div").getByRole(AriaRole.BUTTON).evaluateAll("els => els.map(e => e.outerHTML)"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,26 +153,35 @@ public class TestSelectorsRole extends TestBase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void shouldSupportExpanded() {
|
void shouldSupportExpanded() {
|
||||||
page.setContent("<button>Hi</button>\n" +
|
page.setContent("<div role=\"treeitem\">Hi</div>\n" +
|
||||||
" <button aria-expanded=\"true\">Hello</button>\n" +
|
" <div role=\"treeitem\" aria-expanded=\"true\">Hello</div>\n" +
|
||||||
" <button aria-expanded=\"false\">Bye</button>");
|
" <div role=\"treeitem\" aria-expanded=\"false\">Bye</div>");
|
||||||
assertEquals(asList(
|
assertEquals(asList(
|
||||||
"<button aria-expanded=\"true\">Hello</button>"
|
"<div role=\"treeitem\">Hi</div>",
|
||||||
), page.locator("role=button[expanded]").evaluateAll("els => els.map(e => e.outerHTML)"));
|
"<div role=\"treeitem\" aria-expanded=\"true\">Hello</div>",
|
||||||
|
"<div role=\"treeitem\" aria-expanded=\"false\">Bye</div>"
|
||||||
|
), page.locator("role=treeitem").evaluateAll("els => els.map(e => e.outerHTML)"));
|
||||||
assertEquals(asList(
|
assertEquals(asList(
|
||||||
"<button aria-expanded=\"true\">Hello</button>"
|
"<div role=\"treeitem\">Hi</div>",
|
||||||
), page.locator("role=button[expanded=true]").evaluateAll("els => els.map(e => e.outerHTML)"));
|
"<div role=\"treeitem\" aria-expanded=\"true\">Hello</div>",
|
||||||
assertEquals(asList(
|
"<div role=\"treeitem\" aria-expanded=\"false\">Bye</div>"
|
||||||
"<button aria-expanded=\"true\">Hello</button>"
|
), page.getByRole(AriaRole.TREEITEM).evaluateAll("els => els.map(e => e.outerHTML)"));
|
||||||
), page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setExpanded(true)).evaluateAll("els => els.map(e => e.outerHTML)"));
|
|
||||||
assertEquals(asList(
|
assertEquals(asList("<div role=\"treeitem\" aria-expanded=\"true\">Hello</div>"),
|
||||||
"<button>Hi</button>",
|
page.locator("role=treeitem[expanded]").evaluateAll("els => els.map(e => e.outerHTML)"));
|
||||||
"<button aria-expanded=\"false\">Bye</button>"
|
assertEquals(asList("<div role=\"treeitem\" aria-expanded=\"true\">Hello</div>"),
|
||||||
), page.locator("role=button[expanded=false]").evaluateAll("els => els.map(e => e.outerHTML)"));
|
page.locator("role=treeitem[expanded=true]").evaluateAll("els => els.map(e => e.outerHTML)"));
|
||||||
assertEquals(asList(
|
assertEquals(asList("<div role=\"treeitem\" aria-expanded=\"true\">Hello</div>"),
|
||||||
"<button>Hi</button>",
|
page.getByRole(AriaRole.TREEITEM, new Page.GetByRoleOptions().setExpanded(true)).evaluateAll("els => els.map(e => e.outerHTML)"));
|
||||||
"<button aria-expanded=\"false\">Bye</button>"
|
|
||||||
), page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setExpanded(false)).evaluateAll("els => els.map(e => e.outerHTML)"));
|
assertEquals(asList("<div role=\"treeitem\" aria-expanded=\"false\">Bye</div>"),
|
||||||
|
page.locator("role=treeitem[expanded=false]").evaluateAll("els => els.map(e => e.outerHTML)"));
|
||||||
|
assertEquals(asList("<div role=\"treeitem\" aria-expanded=\"false\">Bye</div>"),
|
||||||
|
page.getByRole(AriaRole.TREEITEM, new Page.GetByRoleOptions().setExpanded(false)).evaluateAll("els => els.map(e => e.outerHTML)"));
|
||||||
|
|
||||||
|
// Workaround for expanded='none'.
|
||||||
|
assertEquals(asList("<div role=\"treeitem\">Hi</div>"),
|
||||||
|
page.locator("[role=treeitem]:not([aria-expanded])").evaluateAll("els => els.map(e => e.outerHTML)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.microsoft.playwright</groupId>
|
<groupId>com.microsoft.playwright</groupId>
|
||||||
<artifactId>parent-pom</artifactId>
|
<artifactId>parent-pom</artifactId>
|
||||||
<version>1.28.0-SNAPSHOT</version>
|
<version>1.28.1</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Playwright Parent Project</name>
|
<name>Playwright Parent Project</name>
|
||||||
<description>Java library to automate Chromium, Firefox and WebKit with a single API.
|
<description>Java library to automate Chromium, Firefox and WebKit with a single API.
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
1.28.0
|
1.28.1
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.microsoft.playwright</groupId>
|
<groupId>com.microsoft.playwright</groupId>
|
||||||
<artifactId>api-generator</artifactId>
|
<artifactId>api-generator</artifactId>
|
||||||
<version>1.28.0-SNAPSHOT</version>
|
<version>1.28.1</version>
|
||||||
<name>Playwright - API Generator</name>
|
<name>Playwright - API Generator</name>
|
||||||
<description>
|
<description>
|
||||||
This is an internal module used to generate Java API from the upstream Playwright
|
This is an internal module used to generate Java API from the upstream Playwright
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.microsoft.playwright</groupId>
|
<groupId>com.microsoft.playwright</groupId>
|
||||||
<artifactId>test-cli-version</artifactId>
|
<artifactId>test-cli-version</artifactId>
|
||||||
<version>1.28.0-SNAPSHOT</version>
|
<version>1.28.1</version>
|
||||||
<name>Test Playwright Command Line Version</name>
|
<name>Test Playwright Command Line Version</name>
|
||||||
<properties>
|
<properties>
|
||||||
<compiler.version>1.8</compiler.version>
|
<compiler.version>1.8</compiler.version>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.microsoft.playwright</groupId>
|
<groupId>com.microsoft.playwright</groupId>
|
||||||
<artifactId>test-local-installation</artifactId>
|
<artifactId>test-local-installation</artifactId>
|
||||||
<version>1.28.0-SNAPSHOT</version>
|
<version>1.28.1</version>
|
||||||
<name>Test local installation</name>
|
<name>Test local installation</name>
|
||||||
<description>Runs Playwright test suite (copied from playwright module) against locally cached Playwright</description>
|
<description>Runs Playwright test suite (copied from playwright module) against locally cached Playwright</description>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
</parent>
|
</parent>
|
||||||
<groupId>com.microsoft.playwright</groupId>
|
<groupId>com.microsoft.playwright</groupId>
|
||||||
<artifactId>test-spring-boot-starter</artifactId>
|
<artifactId>test-spring-boot-starter</artifactId>
|
||||||
<version>1.28.0-SNAPSHOT</version>
|
<version>1.28.1</version>
|
||||||
<name>Test Playwright With Spring Boot</name>
|
<name>Test Playwright With Spring Boot</name>
|
||||||
<properties>
|
<properties>
|
||||||
<spring.version>2.4.3</spring.version>
|
<spring.version>2.4.3</spring.version>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.microsoft.playwright</groupId>
|
<groupId>com.microsoft.playwright</groupId>
|
||||||
<artifactId>update-version</artifactId>
|
<artifactId>update-version</artifactId>
|
||||||
<version>1.28.0-SNAPSHOT</version>
|
<version>1.28.1</version>
|
||||||
<name>Playwright - Update Version in Documentation</name>
|
<name>Playwright - Update Version in Documentation</name>
|
||||||
<description>
|
<description>
|
||||||
This is an internal module used to update versions in the documentation based on
|
This is an internal module used to update versions in the documentation based on
|
||||||
|
|||||||
Reference in New Issue
Block a user