-
-
Notifications
You must be signed in to change notification settings - Fork 752
Expand file tree
/
Copy pathseeInField.mustache
More file actions
17 lines (15 loc) · 876 Bytes
/
seeInField.mustache
File metadata and controls
17 lines (15 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Checks that the given input field or textarea equals to given value.
For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
The third parameter is an optional context (CSS or XPath locator) to narrow the search.
```js
I.seeInField('Username', 'davert');
I.seeInField({css: 'form textarea'},'Type your comment here');
I.seeInField('form input[type=hidden]','hidden_value');
I.seeInField('#searchform input','Search');
// within a context
I.seeInField('Name', 'John', '.form-container');
```
@param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
@param {CodeceptJS.StringOrSecret} value value to check.
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
@returns {void} automatically synchronized promise through #recorder