Skip to content

Commit

Permalink
chore: bringing the name of options to a general form
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorBodnar committed Apr 21, 2023
1 parent e41ae93 commit 698701c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/helpers/Playwright.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ I.click({css: 'nav a.login'});
- `locator` **([string][8] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
- `context` **([string][8]? | [object][5] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
⚠️ returns a _promise_ which is synchronized internally by recorder
- `opts` **any?** [Additional options][10] for click available as 3rd argument.Examples:```js
- `options` **any?** [Additional options][10] for click available as 3rd argument.Examples:```js
// click on element at position
I.click('canvas', '.model', { position: { x: 20, y: 40 } })

Expand Down Expand Up @@ -1994,7 +1994,7 @@ See [Playwright's reference][31]

#### Parameters

- `opts` **any**
- `options` **any**

### waitForRequest

Expand Down
16 changes: 8 additions & 8 deletions lib/helper/Playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,7 @@ class Playwright extends Helper {
/**
* {{> click }}
*
* @param {any} [opts] [Additional options](https://playwright.dev/docs/api/class-page#page-click) for click available as 3rd argument.
* @param {any} [options] [Additional options](https://playwright.dev/docs/api/class-page#page-click) for click available as 3rd argument.
*
* Examples:
*
Expand All @@ -1295,8 +1295,8 @@ class Playwright extends Helper {
* ```
*
*/
async click(locator, context = null, opts = {}) {
return proceedClick.call(this, locator, context, opts);
async click(locator, context = null, options = {}) {
return proceedClick.call(this, locator, context, options);
}

/**
Expand Down Expand Up @@ -2448,15 +2448,15 @@ class Playwright extends Helper {
*
* See [Playwright's reference](https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions)
*
* @param {*} opts
* @param {*} options
*/
async waitForNavigation(opts = {}) {
opts = {
async waitForNavigation(options = {}) {
options = {
timeout: this.options.getPageTimeout,
waitUntil: this.options.waitForNavigation,
...opts,
...options,
};
return this.page.waitForNavigation(opts);
return this.page.waitForNavigation(options);
}

async waitUntilExists(locator, sec) {
Expand Down

0 comments on commit 698701c

Please sign in to comment.