diff --git a/docs/helpers/Playwright.md b/docs/helpers/Playwright.md index 760427220..ca29134be 100644 --- a/docs/helpers/Playwright.md +++ b/docs/helpers/Playwright.md @@ -1267,9 +1267,13 @@ I.seeInField('#searchform input','Search'); Checks that the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`, contains the given string. +```js +I.seeInPopup('Popup text'); +``` + #### Parameters -- `text` +- `text` **[string][7]** value to check. ### seeInSource diff --git a/docs/helpers/Protractor.md b/docs/helpers/Protractor.md index c26d85b7e..fe0bb3544 100644 --- a/docs/helpers/Protractor.md +++ b/docs/helpers/Protractor.md @@ -1094,9 +1094,13 @@ I.seeInField('#searchform input','Search'); Checks that the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`, contains the given string. +```js +I.seeInPopup('Popup text'); +``` + #### Parameters -- `text` +- `text` **[string][9]** value to check. ### seeInSource diff --git a/docs/helpers/Puppeteer.md b/docs/helpers/Puppeteer.md index 1a7fb8df8..c0d60459c 100644 --- a/docs/helpers/Puppeteer.md +++ b/docs/helpers/Puppeteer.md @@ -1366,9 +1366,13 @@ I.seeInField('#searchform input','Search'); Checks that the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`, contains the given string. +```js +I.seeInPopup('Popup text'); +``` + #### Parameters -- `text` +- `text` **[string][8]** value to check. ### seeInSource diff --git a/docs/webapi/seeInPopup.mustache b/docs/webapi/seeInPopup.mustache new file mode 100644 index 000000000..55b657bc7 --- /dev/null +++ b/docs/webapi/seeInPopup.mustache @@ -0,0 +1,7 @@ +Checks that the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`, contains the +given string. + +```js +I.seeInPopup('Popup text'); +``` +@param {string} text value to check. diff --git a/lib/helper/Playwright.js b/lib/helper/Playwright.js index cc1208c49..04bed1122 100644 --- a/lib/helper/Playwright.js +++ b/lib/helper/Playwright.js @@ -390,8 +390,7 @@ class Playwright extends Helper { } /** - * Checks that the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`, contains the - * given string. + * {{> seeInPopup }} */ async seeInPopup(text) { popupStore.assertPopupVisible(); diff --git a/lib/helper/Protractor.js b/lib/helper/Protractor.js index 950697cdd..5492be1a6 100644 --- a/lib/helper/Protractor.js +++ b/lib/helper/Protractor.js @@ -1054,8 +1054,7 @@ class Protractor extends Helper { } /** - * Checks that the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`, contains the - * given string. + * {{> seeInPopup }} */ async seeInPopup(text) { const popupAlert = await this.browser.switchTo().alert(); diff --git a/lib/helper/Puppeteer.js b/lib/helper/Puppeteer.js index 116fc3239..e879b60dc 100644 --- a/lib/helper/Puppeteer.js +++ b/lib/helper/Puppeteer.js @@ -361,8 +361,7 @@ class Puppeteer extends Helper { } /** - * Checks that the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`, contains the - * given string. + * {{> seeInPopup }} */ async seeInPopup(text) { popupStore.assertPopupVisible();