-
Notifications
You must be signed in to change notification settings - Fork 241
Browser: Add getBy* APIs for frame, frameLocator and locator docs and locator.contentFrame #2055
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
Conversation
💻 Deploy preview deleted. |
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.
Wow! Excellent work! 👏 Thanks for deduplicating the getBy*
APIs.
|
||
# getByTestId(testId) | ||
|
||
Returns a locator for elements with the specified test ID attribute. This method is designed for robust test automation by locating elements using dedicated test identifiers that are independent of the visual appearance or content changes. Currently it can only work with the `data-testid` attribute. |
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.
@AgnesToulet in general we try to avoid using "currently" in the docs, and we focus on documenting the current behavior. Do you know if this is something that would change soon?
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.
No plans to change it, should I just remove currently
?
What?
This PR includes:
getBy*
APIs forframeLocator
,frame
andlocator
(main doc was taken from thepage
class and moved to theshared
folder)locator.contentFrame()
APIpage.getBy*
methods (you can see them in this commit as they are hard to see with the move to the shared folder)Checklist
I have used a meaningful title for the PR.
I have described the changes I've made in the "What?" section above.
I have performed a self-review of my changes.
I have run the
npm start
command locally and verified that the changes look good.I have made my changes in the
docs/sources/k6/next
folder of the documentation.Related PR(s)/Issue(s)