setValue

Send a sequence of key strokes to an element (clears value before). You can also use unicode characters like Left arrow or Back space. WebdriverIO will take care of translating them into unicode characters. You’ll find all supported characters here. To do that, the value has to correspond to a key from the table.

Usage

1
client.setValue(selector[,values]).then(callback);

Parameters

Param Type Details
selector String Input element
values
optional
String/Number Input element

Example

setValue.js
1
2
3
4
5
client
.setValue('.input', 'test123')
.getValue('.input').then(function(value) {
assert(value === 'test123'); // true
});

Uses