Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: make Request.failure return string by default (#5289)

Yury Semikhatsky6c44a781c71d
diff --git a/docs/src/api/class-request.md b/docs/src/api/class-request.md
index c25664e889..b858bf6888 100644
--- a/docs/src/api/class-request.md
+++ b/docs/src/api/class-request.md
@@ -17,8 +17,7 @@ If request gets a 'redirect' response, the request is successfully finished with
request is issued to a redirected url.
## method: Request.failure
-- returns: <[null]|[Object]>
- - `errorText` <[string]> Human-readable error message, e.g. `'net::ERR_FAILED'`.
+- returns: <[null]|[string]>
The method returns `null` unless this request has failed, as reported by `requestfailed` event.
diff --git a/docs/src/api/javascript.md b/docs/src/api/javascript.md
index 92885f99c7..bba54b7cef 100644
--- a/docs/src/api/javascript.md
+++ b/docs/src/api/javascript.md
@@ -2,6 +2,11 @@
* langs: js
- returns: <[null]|[Error]>
+## method: Request.failure
+* langs: js
+- returns: <[null]|[Object]>
+ - `errorText` <[string]> Human-readable error message, e.g. `'net::ERR_FAILED'`.
+
### param: ElementHandle.evalOnSelector.expression = %%-js-evalonselector-pagefunction-%%
### param: ElementHandle.evalOnSelectorAll.expression = %%-js-evalonselectorall-pagefunction-%%
### param: Frame.evalOnSelector.expression = %%-js-evalonselector-pagefunction-%%
diff --git a/docs/src/api/python.md b/docs/src/api/python.md
index 38f243bf12..a67be97fc1 100644
--- a/docs/src/api/python.md
+++ b/docs/src/api/python.md
@@ -81,10 +81,6 @@ Path to the JavaScript file. If `path` is a relative path, then it is resolved r
Raw script content.
-## method: Request.failure
-* langs: python
-- returns: <[null]|[string]>
-
## async method: Page.waitForEvent
* langs: python
- returns: <[EventContextManager]>