-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
chore: Add new method testIdAttributeName #32506
base: main
Are you sure you want to change the base?
chore: Add new method testIdAttributeName #32506
Conversation
@microsoft-github-policy-service agree |
c9f507a
to
0ef7152
Compare
This comment has been minimized.
This comment has been minimized.
0ef7152
to
03681dd
Compare
This comment has been minimized.
This comment has been minimized.
03681dd
to
6a2187b
Compare
This comment has been minimized.
This comment has been minimized.
6a2187b
to
d5c4b49
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For any API changes, please file an issue first (probably a Feature request), so we can have a discussion there. This helps with visibility and code archeology in the future.
Test results for "tests 1"2 failed 2 flaky29595 passed, 638 skipped Merge workflow run. |
Would it be possible to file an issue for it first? Usually Playwright expects the call side to know which values has been set (we don't have setters for everything) - so curious who changes the testIdAttribute in your case. |
Hi @mxschmitt & @dgozman Thanks for the replies... I was going to recreate as Feature request, now I'm not clear which one. Originally I thought this was perhaps just a missing method, because the similarities in the Happy switch to either Issue/Feature, but would appreciate follow up to which?
|
Description:
This pull request introduces a new method,
testIdAttributeName
; this method will get the current TestIdAttributeName either set usingSelectors.setTestIdAttribute
or initially with the user config. Therefore this will introduceSelectors.testIdAttributeName
Motivation:
Knowing the most up-to date set
testIdAttributeName
. If the testAttributeName has been modified at runtime, this new method would allow the user to get this value. In my own use-case I want to get the value because across and within my projects, shared libraries need to know what the current testid is and a simple export viaplaywright.config.ts
of thetestIdAttribute
value is not sufficient enough.Changes:
Added functionality and a test to confirm the current
testIdAttributeName