# 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`](/docs/api/browser/keys.md) command with the [`Key`](/docs/api/modules.md#key) object.

## Usage[​](#usage "Direct link to Usage")

```
await $(selector).addValue(value, additional)
```

## Parameters[​](#parameters "Direct link to Parameters")

| Name         | Type             | Details                           |
| ------------ | ---------------- | --------------------------------- |
| `value`      | `string, number` | value to be added                 |
| `additional` | `InputOptions`   | options, exclusive to Webdriverio |

## Example[​](#example "Direct link to 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
})
```
