Skip to content

Commit fc07c91

Browse files
authored
chore: roll driver, mark 1.20.1 (#862)
1 parent 6ae0df8 commit fc07c91

File tree

14 files changed

+35
-18
lines changed

14 files changed

+35
-18
lines changed

driver-bundle/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.microsoft.playwright</groupId>
88
<artifactId>parent-pom</artifactId>
9-
<version>1.20.0</version>
9+
<version>1.20.1</version>
1010
</parent>
1111

1212
<artifactId>driver-bundle</artifactId>

driver/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.microsoft.playwright</groupId>
88
<artifactId>parent-pom</artifactId>
9-
<version>1.20.0</version>
9+
<version>1.20.1</version>
1010
</parent>
1111

1212
<artifactId>driver</artifactId>

examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>org.example</groupId>
88
<artifactId>examples</artifactId>
9-
<version>1.20.0</version>
9+
<version>1.20.1</version>
1010
<name>Playwright Client Examples</name>
1111
<properties>
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

playwright/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.microsoft.playwright</groupId>
99
<artifactId>parent-pom</artifactId>
10-
<version>1.20.0</version>
10+
<version>1.20.1</version>
1111
</parent>
1212

1313
<artifactId>playwright</artifactId>

playwright/src/main/java/com/microsoft/playwright/APIRequest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
import java.util.*;
2222

2323
/**
24-
* Exposes API that can be used for the Web API testing. Each Playwright browser context has a APIRequestContext instance
25-
* attached which shares cookies with the page context. Its also possible to create a new APIRequestContext instance
26-
* manually. For more information see <a href="https://playwright.dev/java/docs/class-apirequestcontext">here</a>.
24+
* Exposes API that can be used for the Web API testing. This class is used for creating {@code APIRequestContext} instance which
25+
* in turn can be used for sending web requests. An instance of this class can be obtained via {@link Playwright#request
26+
* Playwright.request()}. For more information see {@code APIRequestContext}.
2727
*/
2828
public interface APIRequest {
2929
class NewContextOptions {

playwright/src/main/java/com/microsoft/playwright/APIRequestContext.java

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,24 @@
2121

2222
/**
2323
* This API is used for the Web API testing. You can use it to trigger API endpoints, configure micro-services, prepare
24-
* environment or the service to your e2e test. When used on {@code Page} or a {@code BrowserContext}, this API will automatically use
25-
* the cookies from the corresponding {@code BrowserContext}. This means that if you log in using this API, your e2e test will be
26-
* logged in and vice versa.
24+
* environment or the service to your e2e test.
25+
*
26+
* <p> Each Playwright browser context has associated with it {@code APIRequestContext} instance which shares cookie storage with the
27+
* browser context and can be accessed via {@link BrowserContext#request BrowserContext.request()} or {@link Page#request
28+
* Page.request()}. It is also possible to create a new APIRequestContext instance manually by calling {@link
29+
* APIRequest#newContext APIRequest.newContext()}.
30+
*
31+
* <p> **Cookie management**
32+
*
33+
* <p> {@code APIRequestContext} retuned by {@link BrowserContext#request BrowserContext.request()} and {@link Page#request
34+
* Page.request()} shares cookie storage with the corresponding {@code BrowserContext}. Each API request will have {@code Cookie}
35+
* header populated with the values from the browser context. If the API response contains {@code Set-Cookie} header it will
36+
* automatically update {@code BrowserContext} cookies and requests made from the page will pick them up. This means that if you
37+
* log in using this API, your e2e test will be logged in and vice versa.
38+
*
39+
* <p> If you want API requests to not interfere with the browser cookies you shoud create a new {@code APIRequestContext} by calling
40+
* {@link APIRequest#newContext APIRequest.newContext()}. Such {@code APIRequestContext} object will have its own isolated cookie
41+
* storage.
2742
*/
2843
public interface APIRequestContext {
2944
class StorageStateOptions {

playwright/src/main/java/com/microsoft/playwright/Page.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4684,7 +4684,9 @@ default Response reload() {
46844684
*/
46854685
Response reload(ReloadOptions options);
46864686
/**
4687-
* API testing helper associated with this page. Requests made with this API will use page cookies.
4687+
* API testing helper associated with this page. This method returns the same instance as {@link BrowserContext#request
4688+
* BrowserContext.request()} on the page's context. See {@link BrowserContext#request BrowserContext.request()} for more
4689+
* details.
46884690
*/
46894691
APIRequestContext request();
46904692
/**

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.microsoft.playwright</groupId>
88
<artifactId>parent-pom</artifactId>
9-
<version>1.20.0</version>
9+
<version>1.20.1</version>
1010
<packaging>pom</packaging>
1111
<name>Playwright Parent Project</name>
1212
<description>Java library to automate Chromium, Firefox and WebKit with a single API.

scripts/CLI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.20.0
1+
1.20.1

tools/api-generator/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.microsoft.playwright</groupId>
88
<artifactId>api-generator</artifactId>
9-
<version>1.20.0</version>
9+
<version>1.20.1</version>
1010
<name>Playwright - API Generator</name>
1111
<description>
1212
This is an internal module used to generate Java API from the upstream Playwright

0 commit comments

Comments
 (0)