1
0
mirror of synced 2026-05-23 03:03:15 +00:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Andrey Lushnikov b1c5ec2083 chore: roll driver to 1.17.0-rc1 (#710) 2021-11-18 08:53:44 -08:00
Andrey Lushnikov eca3491203 cherry-pick(#709): chore: proper driver URL detection
Since Nov 16, 2021, we have the following conventions:

- Drivers published from tip-of-tree have an `-alpha` version and are
  stored at `/next` subfolder on Azure Storage.
- Drivers auto-published for each commit of the release branch have a `-beta` version and are
  stored at `/next` subfolder on Azure Storage.
- Drivers published due to a release might have `-rc` as part of the
  version, and are stored in root subfolder on Azure Storage.

We no longer have driver versions that include "next" as part of the
version. I kept it for backwards compatibility.
2021-11-17 18:33:32 -08:00
Andrey Lushnikov 558df1fc60 chore: mark v1.17.0 (#701) 2021-11-15 14:52:44 -08:00
Andrey Lushnikov ba5bd2c9ac chore: roll to beta driver version (#700) 2021-11-15 14:43:57 -08:00
16 changed files with 90 additions and 40 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>com.microsoft.playwright</groupId>
<artifactId>parent-pom</artifactId>
<version>1.17.0-SNAPSHOT</version>
<version>1.17.0</version>
</parent>
<artifactId>assertions</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>com.microsoft.playwright</groupId>
<artifactId>parent-pom</artifactId>
<version>1.17.0-SNAPSHOT</version>
<version>1.17.0</version>
</parent>
<artifactId>driver-bundle</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>com.microsoft.playwright</groupId>
<artifactId>parent-pom</artifactId>
<version>1.17.0-SNAPSHOT</version>
<version>1.17.0</version>
</parent>
<artifactId>driver</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>org.example</groupId>
<artifactId>examples</artifactId>
<version>1.17.0-SNAPSHOT</version>
<version>1.17.0</version>
<name>Playwright Client Examples</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+1 -1
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>com.microsoft.playwright</groupId>
<artifactId>parent-pom</artifactId>
<version>1.17.0-SNAPSHOT</version>
<version>1.17.0</version>
</parent>
<artifactId>playwright</artifactId>
@@ -23,6 +23,8 @@ import java.util.*;
/**
* ElementHandle represents an in-page DOM element. ElementHandles can be created with the {@link Page#querySelector
* Page.querySelector()} method.
*
* <p> <strong>NOTE:</strong> The use of ElementHandle is discouraged, use {@code Locator} objects and web-first assertions instead.
* <pre>{@code
* ElementHandle hrefElement = page.querySelector("a");
* hrefElement.click();
@@ -34,10 +36,6 @@ import java.util.*;
* <p> ElementHandle instances can be used as an argument in {@link Page#evalOnSelector Page.evalOnSelector()} and {@link
* Page#evaluate Page.evaluate()} methods.
*
* <p> <strong>NOTE:</strong> In most cases, you would want to use the {@code Locator} object instead. You should only use {@code ElementHandle} if you want to
* retain a handle to a particular DOM Node that you intend to pass into {@link Page#evaluate Page.evaluate()} as an
* argument.
*
* <p> The difference between the {@code Locator} and ElementHandle is that the ElementHandle points to a particular element, while
* {@code Locator} captures the logic of how to retrieve an element.
*
@@ -2329,6 +2329,9 @@ public interface Frame {
/**
* Returns the return value of {@code expression}.
*
* <p> <strong>NOTE:</strong> This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests. Use
* {@link Locator#evaluate Locator.evaluate()}, other {@code Locator} helper methods or web-first assertions instead.
*
* <p> The method finds an element matching the specified selector within the frame and passes it as a first argument to
* {@code expression}. See <a href="https://playwright.dev/java/docs/selectors/">Working with selectors</a> for more details. If
* no elements match the selector, the method throws an error.
@@ -2356,6 +2359,9 @@ public interface Frame {
/**
* Returns the return value of {@code expression}.
*
* <p> <strong>NOTE:</strong> This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests. Use
* {@link Locator#evaluate Locator.evaluate()}, other {@code Locator} helper methods or web-first assertions instead.
*
* <p> The method finds an element matching the specified selector within the frame and passes it as a first argument to
* {@code expression}. See <a href="https://playwright.dev/java/docs/selectors/">Working with selectors</a> for more details. If
* no elements match the selector, the method throws an error.
@@ -2382,6 +2388,9 @@ public interface Frame {
/**
* Returns the return value of {@code expression}.
*
* <p> <strong>NOTE:</strong> This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests. Use
* {@link Locator#evaluate Locator.evaluate()}, other {@code Locator} helper methods or web-first assertions instead.
*
* <p> The method finds an element matching the specified selector within the frame and passes it as a first argument to
* {@code expression}. See <a href="https://playwright.dev/java/docs/selectors/">Working with selectors</a> for more details. If
* no elements match the selector, the method throws an error.
@@ -2407,6 +2416,9 @@ public interface Frame {
/**
* Returns the return value of {@code expression}.
*
* <p> <strong>NOTE:</strong> In most cases, {@link Locator#evaluateAll Locator.evaluateAll()}, other {@code Locator} helper methods and web-first
* assertions do a better job.
*
* <p> The method finds all elements matching the specified selector within the frame and passes an array of matched elements
* as a first argument to {@code expression}. See <a href="https://playwright.dev/java/docs/selectors/">Working with
* selectors</a> for more details.
@@ -2431,6 +2443,9 @@ public interface Frame {
/**
* Returns the return value of {@code expression}.
*
* <p> <strong>NOTE:</strong> In most cases, {@link Locator#evaluateAll Locator.evaluateAll()}, other {@code Locator} helper methods and web-first
* assertions do a better job.
*
* <p> The method finds all elements matching the specified selector within the frame and passes an array of matched elements
* as a first argument to {@code expression}. See <a href="https://playwright.dev/java/docs/selectors/">Working with
* selectors</a> for more details.
@@ -2475,7 +2490,7 @@ public interface Frame {
*
* <p> {@code ElementHandle} instances can be passed as an argument to the {@link Frame#evaluate Frame.evaluate()}:
* <pre>{@code
* ElementHandle bodyHandle = frame.querySelector("body");
* ElementHandle bodyHandle = frame.evaluate("document.body");
* String html = (String) frame.evaluate("([body, suffix]) => body.innerHTML + suffix", Arrays.asList(bodyHandle, "hello"));
* bodyHandle.dispose();
* }</pre>
@@ -2510,7 +2525,7 @@ public interface Frame {
*
* <p> {@code ElementHandle} instances can be passed as an argument to the {@link Frame#evaluate Frame.evaluate()}:
* <pre>{@code
* ElementHandle bodyHandle = frame.querySelector("body");
* ElementHandle bodyHandle = frame.evaluate("document.body");
* String html = (String) frame.evaluate("([body, suffix]) => body.innerHTML + suffix", Arrays.asList(bodyHandle, "hello"));
* bodyHandle.dispose();
* }</pre>
@@ -3010,6 +3025,8 @@ public interface Frame {
/**
* Returns the ElementHandle pointing to the frame element.
*
* <p> <strong>NOTE:</strong> The use of {@code ElementHandle} is discouraged, use {@code Locator} objects and web-first assertions instead.
*
* <p> The method finds an element matching the specified selector within the frame. See <a
* href="https://playwright.dev/java/docs/selectors/">Working with selectors</a> for more details. If no elements match the
* selector, returns {@code null}.
@@ -3023,6 +3040,8 @@ public interface Frame {
/**
* Returns the ElementHandle pointing to the frame element.
*
* <p> <strong>NOTE:</strong> The use of {@code ElementHandle} is discouraged, use {@code Locator} objects and web-first assertions instead.
*
* <p> The method finds an element matching the specified selector within the frame. See <a
* href="https://playwright.dev/java/docs/selectors/">Working with selectors</a> for more details. If no elements match the
* selector, returns {@code null}.
@@ -3034,6 +3053,8 @@ public interface Frame {
/**
* Returns the ElementHandles pointing to the frame elements.
*
* <p> <strong>NOTE:</strong> The use of {@code ElementHandle} is discouraged, use {@code Locator} objects instead.
*
* <p> The method finds all elements matching the specified selector within the frame. See <a
* href="https://playwright.dev/java/docs/selectors/">Working with selectors</a> for more details. If no elements match the
* selector, returns empty array.
@@ -3904,6 +3925,9 @@ public interface Frame {
* Returns when element specified by selector satisfies {@code state} option. Returns {@code null} if waiting for {@code hidden} or
* {@code detached}.
*
* <p> <strong>NOTE:</strong> Playwright automatically waits for element to be ready before performing an action. Using {@code Locator} objects and
* web-first assertions make the code wait-for-selector-free.
*
* <p> Wait for the {@code selector} to satisfy {@code state} option (either appear/disappear from dom, or become visible/hidden). If at
* the moment of calling the method {@code selector} already satisfies the condition, the method will return immediately. If the
* selector doesn't satisfy the condition for the {@code timeout} milliseconds, the function will throw.
@@ -3939,6 +3963,9 @@ public interface Frame {
* Returns when element specified by selector satisfies {@code state} option. Returns {@code null} if waiting for {@code hidden} or
* {@code detached}.
*
* <p> <strong>NOTE:</strong> Playwright automatically waits for element to be ready before performing an action. Using {@code Locator} objects and
* web-first assertions make the code wait-for-selector-free.
*
* <p> Wait for the {@code selector} to satisfy {@code state} option (either appear/disappear from dom, or become visible/hidden). If at
* the moment of calling the method {@code selector} already satisfies the condition, the method will return immediately. If the
* selector doesn't satisfy the condition for the {@code timeout} milliseconds, the function will throw.
@@ -3467,7 +3467,10 @@ public interface Page extends AutoCloseable {
*/
void emulateMedia(EmulateMediaOptions options);
/**
* The method finds an element matching the specified selector within the page and passes it as a first argument to
* <strong>NOTE:</strong> This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests. Use
* {@link Locator#evaluate Locator.evaluate()}, other {@code Locator} helper methods or web-first assertions instead.
*
* <p> The method finds an element matching the specified selector within the page and passes it as a first argument to
* {@code expression}. If no elements match the selector, the method throws an error. Returns the value of {@code expression}.
*
* <p> If {@code expression} returns a <a
@@ -3493,7 +3496,10 @@ public interface Page extends AutoCloseable {
return evalOnSelector(selector, expression, arg, null);
}
/**
* The method finds an element matching the specified selector within the page and passes it as a first argument to
* <strong>NOTE:</strong> This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests. Use
* {@link Locator#evaluate Locator.evaluate()}, other {@code Locator} helper methods or web-first assertions instead.
*
* <p> The method finds an element matching the specified selector within the page and passes it as a first argument to
* {@code expression}. If no elements match the selector, the method throws an error. Returns the value of {@code expression}.
*
* <p> If {@code expression} returns a <a
@@ -3518,7 +3524,10 @@ public interface Page extends AutoCloseable {
return evalOnSelector(selector, expression, null);
}
/**
* The method finds an element matching the specified selector within the page and passes it as a first argument to
* <strong>NOTE:</strong> This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests. Use
* {@link Locator#evaluate Locator.evaluate()}, other {@code Locator} helper methods or web-first assertions instead.
*
* <p> The method finds an element matching the specified selector within the page and passes it as a first argument to
* {@code expression}. If no elements match the selector, the method throws an error. Returns the value of {@code expression}.
*
* <p> If {@code expression} returns a <a
@@ -3542,7 +3551,10 @@ public interface Page extends AutoCloseable {
*/
Object evalOnSelector(String selector, String expression, Object arg, EvalOnSelectorOptions options);
/**
* The method finds all elements matching the specified selector within the page and passes an array of matched elements as
* <strong>NOTE:</strong> In most cases, {@link Locator#evaluateAll Locator.evaluateAll()}, other {@code Locator} helper methods and web-first
* assertions do a better job.
*
* <p> The method finds all elements matching the specified selector within the page and passes an array of matched elements as
* a first argument to {@code expression}. Returns the result of {@code expression} invocation.
*
* <p> If {@code expression} returns a <a
@@ -3563,7 +3575,10 @@ public interface Page extends AutoCloseable {
return evalOnSelectorAll(selector, expression, null);
}
/**
* The method finds all elements matching the specified selector within the page and passes an array of matched elements as
* <strong>NOTE:</strong> In most cases, {@link Locator#evaluateAll Locator.evaluateAll()}, other {@code Locator} helper methods and web-first
* assertions do a better job.
*
* <p> The method finds all elements matching the specified selector within the page and passes an array of matched elements as
* a first argument to {@code expression}. Returns the result of {@code expression} invocation.
*
* <p> If {@code expression} returns a <a
@@ -3608,7 +3623,7 @@ public interface Page extends AutoCloseable {
*
* <p> {@code ElementHandle} instances can be passed as an argument to the {@link Page#evaluate Page.evaluate()}:
* <pre>{@code
* ElementHandle bodyHandle = page.querySelector("body");
* ElementHandle bodyHandle = page.evaluate("document.body");
* String html = (String) page.evaluate("([body, suffix]) => body.innerHTML + suffix", Arrays.asList(bodyHandle, "hello"));
* bodyHandle.dispose();
* }</pre>
@@ -3647,7 +3662,7 @@ public interface Page extends AutoCloseable {
*
* <p> {@code ElementHandle} instances can be passed as an argument to the {@link Page#evaluate Page.evaluate()}:
* <pre>{@code
* ElementHandle bodyHandle = page.querySelector("body");
* ElementHandle bodyHandle = page.evaluate("document.body");
* String html = (String) page.evaluate("([body, suffix]) => body.innerHTML + suffix", Arrays.asList(bodyHandle, "hello"));
* bodyHandle.dispose();
* }</pre>
@@ -4535,9 +4550,10 @@ public interface Page extends AutoCloseable {
*/
void press(String selector, String key, PressOptions options);
/**
* The method finds an element matching the specified selector within the page. If no elements match the selector, the
* return value resolves to {@code null}. To wait for an element on the page, use {@link Page#waitForSelector
* Page.waitForSelector()}.
* <strong>NOTE:</strong> The use of {@code ElementHandle} is discouraged, use {@code Locator} objects and web-first assertions instead.
*
* <p> The method finds an element matching the specified selector within the page. If no elements match the selector, the
* return value resolves to {@code null}. To wait for an element on the page, use {@link Locator#waitFor Locator.waitFor()}.
*
* <p> Shortcut for main frame's {@link Frame#querySelector Frame.querySelector()}.
*
@@ -4548,9 +4564,10 @@ public interface Page extends AutoCloseable {
return querySelector(selector, null);
}
/**
* The method finds an element matching the specified selector within the page. If no elements match the selector, the
* return value resolves to {@code null}. To wait for an element on the page, use {@link Page#waitForSelector
* Page.waitForSelector()}.
* <strong>NOTE:</strong> The use of {@code ElementHandle} is discouraged, use {@code Locator} objects and web-first assertions instead.
*
* <p> The method finds an element matching the specified selector within the page. If no elements match the selector, the
* return value resolves to {@code null}. To wait for an element on the page, use {@link Locator#waitFor Locator.waitFor()}.
*
* <p> Shortcut for main frame's {@link Frame#querySelector Frame.querySelector()}.
*
@@ -4559,7 +4576,9 @@ public interface Page extends AutoCloseable {
*/
ElementHandle querySelector(String selector, QuerySelectorOptions options);
/**
* The method finds all elements matching the specified selector within the page. If no elements match the selector, the
* <strong>NOTE:</strong> The use of {@code ElementHandle} is discouraged, use {@code Locator} objects and web-first assertions instead.
*
* <p> The method finds all elements matching the specified selector within the page. If no elements match the selector, the
* return value resolves to {@code []}.
*
* <p> Shortcut for main frame's {@link Frame#querySelectorAll Frame.querySelectorAll()}.
@@ -6343,6 +6362,9 @@ public interface Page extends AutoCloseable {
* Returns when element specified by selector satisfies {@code state} option. Returns {@code null} if waiting for {@code hidden} or
* {@code detached}.
*
* <p> <strong>NOTE:</strong> Playwright automatically waits for element to be ready before performing an action. Using {@code Locator} objects and
* web-first assertions make the code wait-for-selector-free.
*
* <p> Wait for the {@code selector} to satisfy {@code state} option (either appear/disappear from dom, or become visible/hidden). If at
* the moment of calling the method {@code selector} already satisfies the condition, the method will return immediately. If the
* selector doesn't satisfy the condition for the {@code timeout} milliseconds, the function will throw.
@@ -6378,6 +6400,9 @@ public interface Page extends AutoCloseable {
* Returns when element specified by selector satisfies {@code state} option. Returns {@code null} if waiting for {@code hidden} or
* {@code detached}.
*
* <p> <strong>NOTE:</strong> Playwright automatically waits for element to be ready before performing an action. Using {@code Locator} objects and
* web-first assertions make the code wait-for-selector-free.
*
* <p> Wait for the {@code selector} to satisfy {@code state} option (either appear/disappear from dom, or become visible/hidden). If at
* the moment of calling the method {@code selector} already satisfies the condition, the method will return immediately. If the
* selector doesn't satisfy the condition for the {@code timeout} milliseconds, the function will throw.
@@ -62,11 +62,11 @@ public interface Selectors {
* Page page = browser.newPage();
* page.setContent("<div><button>Click me</button></div>");
* // Use the selector prefixed with its name.
* ElementHandle button = page.querySelector("tag=button");
* Locator button = page.locator("tag=button");
* // Combine it with other selector engines.
* page.click("tag=div >> text=\"Click me\"");
* // Can use it in any methods supporting selectors.
* int buttonCount = (int) page.evalOnSelectorAll("tag=button", "buttons => buttons.length");
* int buttonCount = (int) page.locator("tag=button").count();
* browser.close();
* }</pre>
*
@@ -97,11 +97,11 @@ public interface Selectors {
* Page page = browser.newPage();
* page.setContent("<div><button>Click me</button></div>");
* // Use the selector prefixed with its name.
* ElementHandle button = page.querySelector("tag=button");
* Locator button = page.locator("tag=button");
* // Combine it with other selector engines.
* page.click("tag=div >> text=\"Click me\"");
* // Can use it in any methods supporting selectors.
* int buttonCount = (int) page.evalOnSelectorAll("tag=button", "buttons => buttons.length");
* int buttonCount = (int) page.locator("tag=button").count();
* browser.close();
* }</pre>
*
@@ -130,11 +130,11 @@ public interface Selectors {
* Page page = browser.newPage();
* page.setContent("<div><button>Click me</button></div>");
* // Use the selector prefixed with its name.
* ElementHandle button = page.querySelector("tag=button");
* Locator button = page.locator("tag=button");
* // Combine it with other selector engines.
* page.click("tag=div >> text=\"Click me\"");
* // Can use it in any methods supporting selectors.
* int buttonCount = (int) page.evalOnSelectorAll("tag=button", "buttons => buttons.length");
* int buttonCount = (int) page.locator("tag=button").count();
* browser.close();
* }</pre>
*
@@ -165,11 +165,11 @@ public interface Selectors {
* Page page = browser.newPage();
* page.setContent("<div><button>Click me</button></div>");
* // Use the selector prefixed with its name.
* ElementHandle button = page.querySelector("tag=button");
* Locator button = page.locator("tag=button");
* // Combine it with other selector engines.
* page.click("tag=div >> text=\"Click me\"");
* // Can use it in any methods supporting selectors.
* int buttonCount = (int) page.evalOnSelectorAll("tag=button", "buttons => buttons.length");
* int buttonCount = (int) page.locator("tag=button").count();
* browser.close();
* }</pre>
*
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>com.microsoft.playwright</groupId>
<artifactId>parent-pom</artifactId>
<version>1.17.0-SNAPSHOT</version>
<version>1.17.0</version>
<packaging>pom</packaging>
<name>Playwright Parent Project</name>
<description>Java library to automate Chromium, Firefox and WebKit with a single API.
+1 -1
View File
@@ -1 +1 @@
1.17.0-next-1636496060000
1.17.0-rc1
+1 -1
View File
@@ -45,7 +45,7 @@ do
echo "Downloading driver for $PLATFORM to $(pwd)"
URL=https://playwright.azureedge.net/builds/driver
if ! [[ $CLI_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
if [[ "$CLI_VERSION" == *-alpha* || "$CLI_VERSION" == *-beta* || "$CLI_VERSION" == *-next* ]]; then
URL=$URL/next
fi
URL=$URL/$FILE_NAME
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>com.microsoft.playwright</groupId>
<artifactId>api-generator</artifactId>
<version>1.17.0-SNAPSHOT</version>
<version>1.17.0</version>
<name>Playwright - API Generator</name>
<description>
This is an internal module used to generate Java API from the upstream Playwright
+1 -1
View File
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.microsoft.playwright</groupId>
<artifactId>test-local-installation</artifactId>
<version>1.17.0-SNAPSHOT</version>
<version>1.17.0</version>
<name>Test local installation</name>
<description>Runs Playwright test suite (copied from playwright module) against locally cached Playwright</description>
<properties>
+1 -1
View File
@@ -9,7 +9,7 @@
</parent>
<groupId>com.microsoft.playwright</groupId>
<artifactId>test-spring-boot-starter</artifactId>
<version>1.17.0-SNAPSHOT</version>
<version>1.17.0</version>
<name>Test Playwright With Spring Boot</name>
<properties>
<spring.version>2.4.3</spring.version>
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>com.microsoft.playwright</groupId>
<artifactId>update-version</artifactId>
<version>1.17.0-SNAPSHOT</version>
<version>1.17.0</version>
<name>Playwright - Update Version in Documentation</name>
<description>
This is an internal module used to update versions in the documentation based on