From f30f37ff4179f747c53242e90d98491b3375652e Mon Sep 17 00:00:00 2001 From: kobenguyent Date: Tue, 30 Apr 2024 15:33:56 +0200 Subject: [PATCH] fix: wrong format docs --- docs/helpers/Playwright.md | 12 ++++++++---- lib/helper/Playwright.js | 3 +-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/helpers/Playwright.md b/docs/helpers/Playwright.md index c65756b7f..c75b5cc7f 100644 --- a/docs/helpers/Playwright.md +++ b/docs/helpers/Playwright.md @@ -1376,12 +1376,16 @@ Returns **[Promise][22]<[string][9]>** title Returns full URL of request matching parameter "urlMatch". +Examples: + +```js +I.grabTrafficUrl('https://api.example.com/session'); +I.grabTrafficUrl(/session.*start/); +``` + #### Parameters -- `urlMatch` **([string][9] | [RegExp][11])** Expected URL of request in network traffic. Can be a string or a regular expression.Examples:```js - I.grabTrafficUrl('https://api.example.com/session'); - I.grabTrafficUrl(/session.*start/); - ``` +- `urlMatch` **([string][9] | [RegExp][11])** Expected URL of request in network traffic. Can be a string or a regular expression. Returns **[Promise][22]<any>** diff --git a/lib/helper/Playwright.js b/lib/helper/Playwright.js index 6046b2679..697e27561 100644 --- a/lib/helper/Playwright.js +++ b/lib/helper/Playwright.js @@ -3115,8 +3115,6 @@ class Playwright extends Helper { /** * Returns full URL of request matching parameter "urlMatch". * - * @param {string|RegExp} urlMatch Expected URL of request in network traffic. Can be a string or a regular expression. - * * Examples: * * ```js @@ -3124,6 +3122,7 @@ class Playwright extends Helper { * I.grabTrafficUrl(/session.*start/); * ``` * + * @param {string|RegExp} urlMatch Expected URL of request in network traffic. Can be a string or a regular expression. * @return {Promise<*>} */ grabTrafficUrl(urlMatch) {