Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Selective Selector Generation #23164

Closed
0pilatos0 opened this issue May 19, 2023 · 1 comment
Closed

[Feature] Selective Selector Generation #23164

0pilatos0 opened this issue May 19, 2023 · 1 comment

Comments

@0pilatos0
Copy link

I would like to suggest an enhancement for the Playwright testing framework. Currently, when using the codegen/selector picker feature, it would be beneficial to have the ability to exclude certain types of selectors from being generated. For example, in cases where I am using a framework that assigns a unique ID to each element, I would like to disable the "#ids" selector option to prevent the codegen from randomly selecting one of these dynamically generated IDs.

Proposed Solution:
I propose two possible solutions to address this issue:

  • Ability to Eliminate Selectors: It would be helpful to have a configuration option or flag that allows users to specify certain types of selectors to be excluded from the codegen/selector picker. This way, I can indicate that the "#ids" selector should be ignored, and the codegen will not generate code using this selector type.

  • Selection Range of Available Selectors: Alternatively, providing a range of available selectors to choose from during code generation would also be beneficial. This would allow me to manually select the desired selector type from the available options, excluding the ones I do not wish to use, such as "#ids".

I believe these enhancements would greatly improve the flexibility and usability of the Playwright testing framework, especially in scenarios where specific selectors need to be ignored or selected manually.

image

examples how Aqua (Jetbrains Testing IDE) implemented an feature simular
image
image

@dgozman
Copy link
Contributor

dgozman commented May 19, 2023

Thank you for the issue! Merging into #5178 as a duplicate.

@dgozman dgozman closed this as completed May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants