Skip to main content

addValue

Add a value to an input or textarea element found by given selector.

info

If you like to use special characters, e.g. to copy and paste a value from one input to another, use the keys command.

Usage
$(selector).addValue(value)
Parameters
NameTypeDetails
valuestring, numbervalue to be added
Example
addValue.js
it('should demonstrate the addValue command', async () => {
let input = await $('.input')
await input.addValue('test')
await input.addValue(123)

value = await input.getValue()
assert(value === 'test123') // true
})

Welcome! How can I help?

WebdriverIO AI Copilot