## OTPInput Testkit

### Import

- unidriver: `import { OTPInputUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { OTPInputTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { OTPInputTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { OTPInputTestkit } from '@wix/design-system/dist/testkit/playwright';`

### API

### exists
- signature: exists()
- returns: Promise<boolean>
- description: Checks whether the component found with the given data hook.

### element
- signature: element()
- returns: Promise<any>
- description: Gets the component root element.

### click
- signature: click()
- returns: Promise<void>
- description: Clicks on the component root element.

### base
- signature: base()
- returns: UniDriver
- description: Returns UniDriver for the base element.

### getLength
- signature: getLength()
- returns: Promise<number>
- description: Gets the number of slots

### getValue
- signature: getValue()
- returns: Promise<string>
- description: Gets the entered code

### getSlotAt
- signature: getSlotAt(index)
- returns: Promise<string>
- description: Gets the character shown in a slot, or an empty string when the slot is empty

### enterValue
- signature: enterValue(value)
- returns: Promise<void>
- description: Enters a code, as typing, pasting or autofill would

### isInvalid
- signature: isInvalid()
- returns: Promise<boolean>
- description: Checks whether the input is marked as invalid

### isDisabled
- signature: isDisabled()
- returns: Promise<boolean>
- description: Checks whether the input is disabled

### isReadOnly
- signature: isReadOnly()
- returns: Promise<boolean>
- description: Checks whether the code can't be edited
