View Source Improve this doc

addValue

Add a value to an object found by given selector. 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
2
browser.addValue(selector,values);

Parameters

Param Type Details
selector String Input element
values String/Number value to be added

Example

addValue.js
1
2
3
4
5
6
7
8
9
10
11
12
it('should demonstrate the addValue command', function () {
var input = $('.input')
input.setValue('test')
input.addValue(123)
// same as
browser.setValue('.input', 'test')
browser.addValue('.input', '123')
var value = elem.getValue()
assert(value === 'test123') // true
})

Uses