jllt-cm-qa-tstoolkit-playwright-common
v1.0.6
Published
A utility library with common Playwright tools and helpers for end-to-end testing.
Keywords
Readme
jllt-cm-qa-tstoolkit-playwright-common
A utility library with common Playwright tools and helpers for end-to-end testing.
Features
- Generic dropdown option extraction
- Element validation utilities
- AG Grid table tools
- General test utilities
Installation
npm install jllt-cm-qa-tstoolkit-playwright-commonUsage
Import the functions you need in your Playwright test project:
import { getDropdownOptionsGeneric } from 'jllt-cm-qa-tstoolkit-playwright-common';
const options = await getDropdownOptionsGeneric(
page,
'#dropdownSelector',
'.dropdown-panel',
'.dropdown-option'
);
console.log(options);API
getDropdownOptionsGeneric
Extracts and returns the visible options from a dropdown.
Parameters:
page: Page– Playwright Page objectdropdownSelector: string– Selector for the dropdown elementpanelSelector: string– Selector for the dropdown paneloptionsSelector: string– Selector for the dropdown options
Returns:Promise<string[]> – Array of option texts
Other utilities are available for element validation and AG Grid table handling.
See the source code for more details.
Contributing
Feel free to open issues or submit pull requests.
License
This software is provided free of charge for personal and internal use only.
You may not sell, distribute, or sublicense this software, nor modify its source code.
Any commercial use or modification is strictly prohibited.
Copyright (c) [2025]
