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) {