1
0
mirror of synced 2026-08-31 19:55:37 +00:00

Compare commits

...

6 Commits

Author SHA1 Message Date
Andrey Lushnikov 1cc79c4c41 chore: mark v1.15.2 (#638) 2021-10-05 11:52:54 -07:00
Andrey Lushnikov 43da8b23e1 chore: roll to 1.15.2-1633455481000 (#637) 2021-10-05 11:30:26 -07:00
Andrey Lushnikov bcc240d5cb chore: mark v1.15.1 (#634) 2021-09-30 14:21:38 -07:00
Yury Semikhatsky 79668f877f chore(release-1.15): roll driver to 1.15.0-1633020276000 (#633) 2021-09-30 11:42:04 -07:00
Andrey Lushnikov e5e9a7db99 chore: roll Java to the new 1.15.1 driver (#625) 2021-09-23 16:53:09 +02:00
Max Schmitt 0c8706f1eb chore: mark 1.15.0 (#619) 2021-09-21 15:12:25 +02:00
14 changed files with 36 additions and 29 deletions
+1 -1
View File
@@ -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.15.0-SNAPSHOT</version> <version>1.15.2</version>
</parent> </parent>
<artifactId>driver-bundle</artifactId> <artifactId>driver-bundle</artifactId>
+1 -1
View File
@@ -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.15.0-SNAPSHOT</version> <version>1.15.2</version>
</parent> </parent>
<artifactId>driver</artifactId> <artifactId>driver</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>org.example</groupId> <groupId>org.example</groupId>
<artifactId>examples</artifactId> <artifactId>examples</artifactId>
<version>1.15.0-SNAPSHOT</version> <version>1.15.2</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
View File
@@ -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.15.0-SNAPSHOT</version> <version>1.15.2</version>
</parent> </parent>
<artifactId>playwright</artifactId> <artifactId>playwright</artifactId>
@@ -86,7 +86,7 @@ public interface Browser extends AutoCloseable {
*/ */
public Double deviceScaleFactor; public Double deviceScaleFactor;
/** /**
* An object containing additional HTTP headers to be sent with every request. All header values must be strings. * An object containing additional HTTP headers to be sent with every request.
*/ */
public Map<String, String> extraHTTPHeaders; public Map<String, String> extraHTTPHeaders;
/** /**
@@ -107,7 +107,7 @@ public interface Browser extends AutoCloseable {
*/ */
public HttpCredentials httpCredentials; public HttpCredentials httpCredentials;
/** /**
* Whether to ignore HTTPS errors during navigation. Defaults to {@code false}. * Whether to ignore HTTPS errors when sending network requests. Defaults to {@code false}.
*/ */
public Boolean ignoreHTTPSErrors; public Boolean ignoreHTTPSErrors;
/** /**
@@ -249,7 +249,7 @@ public interface Browser extends AutoCloseable {
return this; return this;
} }
/** /**
* An object containing additional HTTP headers to be sent with every request. All header values must be strings. * An object containing additional HTTP headers to be sent with every request.
*/ */
public NewContextOptions setExtraHTTPHeaders(Map<String, String> extraHTTPHeaders) { public NewContextOptions setExtraHTTPHeaders(Map<String, String> extraHTTPHeaders) {
this.extraHTTPHeaders = extraHTTPHeaders; this.extraHTTPHeaders = extraHTTPHeaders;
@@ -294,7 +294,7 @@ public interface Browser extends AutoCloseable {
return this; return this;
} }
/** /**
* Whether to ignore HTTPS errors during navigation. Defaults to {@code false}. * Whether to ignore HTTPS errors when sending network requests. Defaults to {@code false}.
*/ */
public NewContextOptions setIgnoreHTTPSErrors(boolean ignoreHTTPSErrors) { public NewContextOptions setIgnoreHTTPSErrors(boolean ignoreHTTPSErrors) {
this.ignoreHTTPSErrors = ignoreHTTPSErrors; this.ignoreHTTPSErrors = ignoreHTTPSErrors;
@@ -510,7 +510,7 @@ public interface Browser extends AutoCloseable {
*/ */
public Double deviceScaleFactor; public Double deviceScaleFactor;
/** /**
* An object containing additional HTTP headers to be sent with every request. All header values must be strings. * An object containing additional HTTP headers to be sent with every request.
*/ */
public Map<String, String> extraHTTPHeaders; public Map<String, String> extraHTTPHeaders;
/** /**
@@ -531,7 +531,7 @@ public interface Browser extends AutoCloseable {
*/ */
public HttpCredentials httpCredentials; public HttpCredentials httpCredentials;
/** /**
* Whether to ignore HTTPS errors during navigation. Defaults to {@code false}. * Whether to ignore HTTPS errors when sending network requests. Defaults to {@code false}.
*/ */
public Boolean ignoreHTTPSErrors; public Boolean ignoreHTTPSErrors;
/** /**
@@ -673,7 +673,7 @@ public interface Browser extends AutoCloseable {
return this; return this;
} }
/** /**
* An object containing additional HTTP headers to be sent with every request. All header values must be strings. * An object containing additional HTTP headers to be sent with every request.
*/ */
public NewPageOptions setExtraHTTPHeaders(Map<String, String> extraHTTPHeaders) { public NewPageOptions setExtraHTTPHeaders(Map<String, String> extraHTTPHeaders) {
this.extraHTTPHeaders = extraHTTPHeaders; this.extraHTTPHeaders = extraHTTPHeaders;
@@ -718,7 +718,7 @@ public interface Browser extends AutoCloseable {
return this; return this;
} }
/** /**
* Whether to ignore HTTPS errors during navigation. Defaults to {@code false}. * Whether to ignore HTTPS errors when sending network requests. Defaults to {@code false}.
*/ */
public NewPageOptions setIgnoreHTTPSErrors(boolean ignoreHTTPSErrors) { public NewPageOptions setIgnoreHTTPSErrors(boolean ignoreHTTPSErrors) {
this.ignoreHTTPSErrors = ignoreHTTPSErrors; this.ignoreHTTPSErrors = ignoreHTTPSErrors;
@@ -435,7 +435,7 @@ public interface BrowserType {
*/ */
public Path executablePath; public Path executablePath;
/** /**
* An object containing additional HTTP headers to be sent with every request. All header values must be strings. * An object containing additional HTTP headers to be sent with every request.
*/ */
public Map<String, String> extraHTTPHeaders; public Map<String, String> extraHTTPHeaders;
/** /**
@@ -485,7 +485,7 @@ public interface BrowserType {
*/ */
public List<String> ignoreDefaultArgs; public List<String> ignoreDefaultArgs;
/** /**
* Whether to ignore HTTPS errors during navigation. Defaults to {@code false}. * Whether to ignore HTTPS errors when sending network requests. Defaults to {@code false}.
*/ */
public Boolean ignoreHTTPSErrors; public Boolean ignoreHTTPSErrors;
/** /**
@@ -692,7 +692,7 @@ public interface BrowserType {
return this; return this;
} }
/** /**
* An object containing additional HTTP headers to be sent with every request. All header values must be strings. * An object containing additional HTTP headers to be sent with every request.
*/ */
public LaunchPersistentContextOptions setExtraHTTPHeaders(Map<String, String> extraHTTPHeaders) { public LaunchPersistentContextOptions setExtraHTTPHeaders(Map<String, String> extraHTTPHeaders) {
this.extraHTTPHeaders = extraHTTPHeaders; this.extraHTTPHeaders = extraHTTPHeaders;
@@ -784,7 +784,7 @@ public interface BrowserType {
return this; return this;
} }
/** /**
* Whether to ignore HTTPS errors during navigation. Defaults to {@code false}. * Whether to ignore HTTPS errors when sending network requests. Defaults to {@code false}.
*/ */
public LaunchPersistentContextOptions setIgnoreHTTPSErrors(boolean ignoreHTTPSErrors) { public LaunchPersistentContextOptions setIgnoreHTTPSErrors(boolean ignoreHTTPSErrors) {
this.ignoreHTTPSErrors = ignoreHTTPSErrors; this.ignoreHTTPSErrors = ignoreHTTPSErrors;
@@ -167,13 +167,8 @@ public class RequestImpl extends ChannelOwner implements Request {
if (rawHeaders != null) { if (rawHeaders != null) {
return rawHeaders; return rawHeaders;
} }
ResponseImpl response = response(); JsonArray rawHeadersJson = withLogging("Request.allHeaders", () -> {
// there is no response, so should we return the headers we have now? JsonObject result = sendMessage("rawRequestHeaders").getAsJsonObject();
if (response == null) {
return headers;
}
JsonArray rawHeadersJson = response.withLogging("Request.allHeaders", () -> {
JsonObject result = response.sendMessage("rawRequestHeaders").getAsJsonObject();
return result.getAsJsonArray("headers"); return result.getAsJsonArray("headers");
}); });
@@ -73,6 +73,18 @@ public class TestNetworkRequest extends TestBase {
assertEquals(server.PREFIX + "/empty.html", requests.get(1).url()); assertEquals(server.PREFIX + "/empty.html", requests.get(1).url());
} }
@Test
void shouldWorkAllHeadersInsideRoute() {
List<Request> requests = new ArrayList<>();
page.route("**", route -> {
assertTrue(route.request().allHeaders().get("accept").length() > 5);
requests.add(route.request());
route.resume();
});
page.navigate(server.PREFIX + "/empty.html");
assertEquals(1, requests.size());
}
// https://github.com/microsoft/playwright/issues/3993 // https://github.com/microsoft/playwright/issues/3993
@Test @Test
void shouldNotWorkForARedirectAndInterception() { void shouldNotWorkForARedirectAndInterception() {
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>com.microsoft.playwright</groupId> <groupId>com.microsoft.playwright</groupId>
<artifactId>parent-pom</artifactId> <artifactId>parent-pom</artifactId>
<version>1.15.0-SNAPSHOT</version> <version>1.15.2</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
View File
@@ -1 +1 @@
1.15.0-1631797286000 1.15.2-1633455481000
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>com.microsoft.playwright</groupId> <groupId>com.microsoft.playwright</groupId>
<artifactId>api-generator</artifactId> <artifactId>api-generator</artifactId>
<version>1.15.0-SNAPSHOT</version> <version>1.15.2</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
+1 -1
View File
@@ -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.15.0-SNAPSHOT</version> <version>1.15.2</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>
+1 -1
View File
@@ -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.15.0-SNAPSHOT</version> <version>1.15.2</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>
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>com.microsoft.playwright</groupId> <groupId>com.microsoft.playwright</groupId>
<artifactId>update-version</artifactId> <artifactId>update-version</artifactId>
<version>1.15.0-SNAPSHOT</version> <version>1.15.2</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