getValue
Get the value of a <textarea>, <select> or text <input> found by given selector.
If multiple elements are found via the given selector, an array of values is returned instead.
Usage
browser.getValue(selector)
Parameters
| Param | Type | Details |
|---|---|---|
| selector optional | param | input, textarea, or select element |
Example
<input type="text" value="John Doe" id="username">
it('should demonstrate the getValue command', () {
const inputUser = $('#username');
const value = inputUser.getValue();
console.log(value); // outputs: "John Doe"
});