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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2397db1ea0d9671da0a957aa29d77650584430297826843c9648c49f734d4b4
4
- data.tar.gz: e42e6b9b65def3ea385f85b68737d745baa4f4572c407dfdb1b913a1cb7a7f19
3
+ metadata.gz: 79e99154b04a3b18273674554754ce1b06e49ae03f334b7e780f89d3b2b8c50c
4
+ data.tar.gz: e0939e8cde7fd6e57ec24896bf26cf0c19a371a500be3f79fa5f284ca7b047b8
5
5
  SHA512:
6
- metadata.gz: df29b9608775156c8d445377b26346e354c1c2f917df0b36958f65ed353a1fb98aae5db4b5090d2af2f3fe9f2d0087cc39da4c85639f88cad669a21d0d61986d
7
- data.tar.gz: 59237bdaca06fcefd34e9d4809d3a06257fd3353acef68a7132cc6c10761f2c659938023e0e87c442a380e79354df21eb1f368c6a52542da7f80dc6169d6130b
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
- ```ruby
315
- def handle_route(route, request)
316
- if request.post_data["my-string"]
317
- mocked_data = request.post_data.merge({ "my-string" => 'mocked-data'})
318
- route.fulfill(postData: mocked_data)
319
- else
320
- route.continue
321
- end
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
- ```ruby
1248
- def handle_route(route, request)
1249
- if request.post_data["my-string"]
1250
- mocked_data = request.post_data.merge({ "my-string" => 'mocked-data'})
1251
- route.fulfill(postData: mocked_data)
1252
- else
1253
- route.continue
1254
- end
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
@@ -298,6 +298,7 @@
298
298
  * press
299
299
  * query_selector
300
300
  * query_selector_all
301
+ * ~~add_locator_handler~~
301
302
  * reload
302
303
  * route
303
304
  * route_from_har
@@ -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
  [
@@ -14,8 +14,8 @@
14
14
  "write-heading-ids": "docusaurus write-heading-ids"
15
15
  },
16
16
  "dependencies": {
17
- "@docusaurus/core": "^3.0.0",
18
- "@docusaurus/preset-classic": "^3.0.0",
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",