playwright-ruby-client 1.41.1 → 1.42.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/documentation/docs/api/browser_context.md +8 -10
- data/documentation/docs/api/element_handle.md +1 -1
- data/documentation/docs/api/experimental/android.md +0 -6
- data/documentation/docs/api/frame.md +1 -1
- data/documentation/docs/api/keyboard.md +1 -1
- data/documentation/docs/api/locator.md +1 -1
- data/documentation/docs/api/page.md +11 -11
- data/documentation/docs/include/api_coverage.md +1 -0
- data/documentation/docusaurus.config.js +6 -0
- data/documentation/package.json +2 -2
- data/documentation/yarn.lock +1732 -1815
- data/lib/playwright/channel_owners/browser_context.rb +1 -1
- data/lib/playwright/channel_owners/frame.rb +8 -1
- data/lib/playwright/channel_owners/page.rb +6 -2
- data/lib/playwright/har_router.rb +7 -0
- data/lib/playwright/javascript/source_url.rb +16 -0
- data/lib/playwright/javascript.rb +1 -0
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright/waiter.rb +8 -6
- data/lib/playwright_api/android.rb +0 -6
- data/lib/playwright_api/browser_context.rb +1 -1
- data/lib/playwright_api/element_handle.rb +1 -1
- data/lib/playwright_api/frame.rb +1 -1
- data/lib/playwright_api/keyboard.rb +1 -1
- data/lib/playwright_api/locator.rb +1 -1
- data/lib/playwright_api/page.rb +74 -11
- data/lib/playwright_api/request.rb +4 -4
- data/lib/playwright_api/response.rb +4 -4
- data/sig/playwright.rbs +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79e99154b04a3b18273674554754ce1b06e49ae03f334b7e780f89d3b2b8c50c
|
4
|
+
data.tar.gz: e0939e8cde7fd6e57ec24896bf26cf0c19a371a500be3f79fa5f284ca7b047b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b9a52e358b44a45294c244e88f1a7646011db15cf02d14f717b69bbaca4a81df90607a3425079a00c63bc185c8a1e4d5859244da007e67a84d9d399a40a5211
|
7
|
+
data.tar.gz: 1f3a94d32ce82afdd196b2cd928f590bd0278f1ea0eb1cf2cc8ae22a31fbaa5a5ab4414b6dbb0916fd0f42cc6c5609d73da48bcb960b4299215516cbe9b1ac99
|
@@ -311,16 +311,14 @@ page.goto("https://example.com")
|
|
311
311
|
|
312
312
|
It is possible to examine the request to decide the route action. For example, mocking all requests that contain some post data, and leaving all other requests as is:
|
313
313
|
|
314
|
-
```
|
315
|
-
def handle_route(route
|
316
|
-
if
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
end
|
323
|
-
context.route("/api/**", method(:handle_route))
|
314
|
+
```python sync title=example_c78483d1434363f907c28aecef3a1c6d83c0136d98bb07c2bd326cd19e006aa9.py
|
315
|
+
def handle_route(route: Route):
|
316
|
+
if ("my-string" in route.request.post_data):
|
317
|
+
route.fulfill(body="mocked-data")
|
318
|
+
else:
|
319
|
+
route.continue_()
|
320
|
+
context.route("/api/**", handle_route)
|
321
|
+
|
324
322
|
```
|
325
323
|
|
326
324
|
Page routes (set up with [Page#route](./page#route)) take precedence over browser context routes when request matches both
|
@@ -423,7 +423,7 @@ Holding down `Shift` will type the text that corresponds to the `key` in the upp
|
|
423
423
|
If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different
|
424
424
|
respective texts.
|
425
425
|
|
426
|
-
Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When specified with the
|
426
|
+
Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When specified with the
|
427
427
|
modifier, modifier is pressed and being held while the subsequent key is being pressed.
|
428
428
|
|
429
429
|
## query_selector
|
@@ -22,12 +22,6 @@ Playwright has **experimental** support for Android automation. This includes Ch
|
|
22
22
|
|
23
23
|
An example of the Android automation script would be:
|
24
24
|
|
25
|
-
Note that since you don't need Playwright to install web browsers when testing Android, you can omit browser download via setting the following environment variable when installing Playwright:
|
26
|
-
|
27
|
-
```bash js
|
28
|
-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm i -D playwright
|
29
|
-
```
|
30
|
-
|
31
25
|
## devices
|
32
26
|
|
33
27
|
```
|
@@ -857,7 +857,7 @@ Holding down `Shift` will type the text that corresponds to the `key` in the upp
|
|
857
857
|
If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different
|
858
858
|
respective texts.
|
859
859
|
|
860
|
-
Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When specified with the
|
860
|
+
Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When specified with the
|
861
861
|
modifier, modifier is pressed and being held while the subsequent key is being pressed.
|
862
862
|
|
863
863
|
## query_selector
|
@@ -114,7 +114,7 @@ Holding down `Shift` will type the text that corresponds to the `key` in the upp
|
|
114
114
|
If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different
|
115
115
|
respective texts.
|
116
116
|
|
117
|
-
Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When specified with the
|
117
|
+
Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When specified with the
|
118
118
|
modifier, modifier is pressed and being held while the subsequent key is being pressed.
|
119
119
|
|
120
120
|
**Usage**
|
@@ -1056,7 +1056,7 @@ Holding down `Shift` will type the text that corresponds to the `key` in the upp
|
|
1056
1056
|
If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different
|
1057
1057
|
respective texts.
|
1058
1058
|
|
1059
|
-
Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When specified with the
|
1059
|
+
Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When specified with the
|
1060
1060
|
modifier, modifier is pressed and being held while the subsequent key is being pressed.
|
1061
1061
|
|
1062
1062
|
## press_sequentially
|
@@ -1077,11 +1077,13 @@ def pdf(
|
|
1077
1077
|
height: nil,
|
1078
1078
|
landscape: nil,
|
1079
1079
|
margin: nil,
|
1080
|
+
outline: nil,
|
1080
1081
|
pageRanges: nil,
|
1081
1082
|
path: nil,
|
1082
1083
|
preferCSSPageSize: nil,
|
1083
1084
|
printBackground: nil,
|
1084
1085
|
scale: nil,
|
1086
|
+
tagged: nil,
|
1085
1087
|
width: nil)
|
1086
1088
|
```
|
1087
1089
|
|
@@ -1165,7 +1167,7 @@ Holding down `Shift` will type the text that corresponds to the `key` in the upp
|
|
1165
1167
|
If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different
|
1166
1168
|
respective texts.
|
1167
1169
|
|
1168
|
-
Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When specified with the
|
1170
|
+
Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When specified with the
|
1169
1171
|
modifier, modifier is pressed and being held while the subsequent key is being pressed.
|
1170
1172
|
|
1171
1173
|
**Usage**
|
@@ -1244,16 +1246,14 @@ page.goto("https://example.com")
|
|
1244
1246
|
|
1245
1247
|
It is possible to examine the request to decide the route action. For example, mocking all requests that contain some post data, and leaving all other requests as is:
|
1246
1248
|
|
1247
|
-
```
|
1248
|
-
def handle_route(route
|
1249
|
-
if
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
end
|
1256
|
-
page.route("/api/**", method(:handle_route))
|
1249
|
+
```python sync title=example_0ef62eead1348f28a69716a047f3b75c979d3230569d3720d4e7bdd0a22ef647.py
|
1250
|
+
def handle_route(route: Route):
|
1251
|
+
if ("my-string" in route.request.post_data):
|
1252
|
+
route.fulfill(body="mocked-data")
|
1253
|
+
else:
|
1254
|
+
route.continue_()
|
1255
|
+
page.route("/api/**", handle_route)
|
1256
|
+
|
1257
1257
|
```
|
1258
1258
|
|
1259
1259
|
Page routes take precedence over browser context routes (set up with [BrowserContext#route](./browser_context#route)) when request
|
@@ -86,6 +86,12 @@ module.exports = {
|
|
86
86
|
prism: {
|
87
87
|
additionalLanguages: ['bash', 'ruby'],
|
88
88
|
},
|
89
|
+
algolia: {
|
90
|
+
appId: '00PBL1OR8R',
|
91
|
+
apiKey: '38d9bd4fef84d709547a1ca466ee8241',
|
92
|
+
indexName: 'playwright-ruby-client',
|
93
|
+
contextualSearch: false,
|
94
|
+
}
|
89
95
|
},
|
90
96
|
presets: [
|
91
97
|
[
|
data/documentation/package.json
CHANGED
@@ -14,8 +14,8 @@
|
|
14
14
|
"write-heading-ids": "docusaurus write-heading-ids"
|
15
15
|
},
|
16
16
|
"dependencies": {
|
17
|
-
"@docusaurus/core": "^3.
|
18
|
-
"@docusaurus/preset-classic": "^3.
|
17
|
+
"@docusaurus/core": "^3.1.1",
|
18
|
+
"@docusaurus/preset-classic": "^3.1.1",
|
19
19
|
"@mdx-js/react": "^3.0.0",
|
20
20
|
"@svgr/webpack": "^8.1.0",
|
21
21
|
"clsx": "^2.0.0",
|