Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hirohe/antd-playwright-helper
https://github.com/hirohe/antd-playwright-helper
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hirohe/antd-playwright-helper
- Owner: hirohe
- License: mit
- Created: 2022-06-08T02:35:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-09T07:47:48.000Z (over 2 years ago)
- Last Synced: 2024-12-17T13:40:08.463Z (6 days ago)
- Language: TypeScript
- Size: 35.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# antd-playwright-helper
some helper for playwright to interact with antd components
ant design components are quite complex, and it's hard to interact with them directly. such as `DateRangePicker` and `Select`. you need various steps to set the value of these components (locate the form item, find the input element, click or fill some text to search...).
## Usage
### Antd Form Helper
```ts
test('test all kinds of form items', async ({ page }) => {
await page.goto('...')
const formHelper = new AntdFormHelper(page)
await formHelper.fillFormValues([
{
label: 'date-range',
type: AntdInputType.DateRangePicker,
value: ['2022-01-01', '2022-01-24'],
},
{
label: 'city',
type: AntdInputType.SearchSelect,
value: 'Beijing',
}
])
})
```