addValue
Add a value to an input or textarea element found by given selector.
інформація
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
Name | Type | Details |
---|---|---|
value | string , number | value 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
})