diff --git a/docs/webapi/appendField.mustache b/docs/webapi/appendField.mustache index 93e406b83..8daf7b7e2 100644 --- a/docs/webapi/appendField.mustache +++ b/docs/webapi/appendField.mustache @@ -1,11 +1,16 @@ Appends text to a input field or textarea. Field is located by name, label, CSS or XPath +The third parameter is an optional context (CSS or XPath locator) to narrow the search. + ```js I.appendField('#myTextField', 'appended'); // typing secret I.appendField('password', secret('123456')); +// within a context +I.appendField('name', 'John', '.form-container'); ``` @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator @param {string} value text value to append. +@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator. @returns {void} automatically synchronized promise through #recorder diff --git a/docs/webapi/attachFile.mustache b/docs/webapi/attachFile.mustache index 9cc952927..08baf6a3f 100644 --- a/docs/webapi/attachFile.mustache +++ b/docs/webapi/attachFile.mustache @@ -2,11 +2,16 @@ Attaches a file to element located by label, name, CSS or XPath Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located). File will be uploaded to remote system (if tests are running remotely). +The third parameter is an optional context (CSS or XPath locator) to narrow the search. + ```js I.attachFile('Avatar', 'data/avatar.jpg'); I.attachFile('form input[name=avatar]', 'data/avatar.jpg'); +// within a context +I.attachFile('Avatar', 'data/avatar.jpg', '.form-container'); ``` @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator. @param {string} pathToFile local file path relative to codecept.conf.ts or codecept.conf.js config file. +@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator. @returns {void} automatically synchronized promise through #recorder diff --git a/docs/webapi/checkOption.mustache b/docs/webapi/checkOption.mustache index fbdbeb2ce..c7a4c4582 100644 --- a/docs/webapi/checkOption.mustache +++ b/docs/webapi/checkOption.mustache @@ -1,7 +1,7 @@ Selects a checkbox or radio button. Element is located by label or name or CSS or XPath. -The second parameter is a context (CSS or XPath locator) to narrow the search. +The second parameter is an optional context (CSS or XPath locator) to narrow the search. ```js I.checkOption('#agree'); diff --git a/docs/webapi/clearField.mustache b/docs/webapi/clearField.mustache index c03797de8..fe0790120 100644 --- a/docs/webapi/clearField.mustache +++ b/docs/webapi/clearField.mustache @@ -1,9 +1,14 @@ Clears a `