Skip to content

Conversation

AgnesToulet
Copy link
Contributor

@AgnesToulet AgnesToulet commented Sep 12, 2025

What?

This PR includes:

  • New getBy* APIs for frameLocator, frame and locator (main doc was taken from the page class and moved to the shared folder)
  • New locator.contentFrame() API
  • Minor fixes in page.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)

Copy link
Contributor

github-actions bot commented Sep 12, 2025

💻 Deploy preview deleted.

@AgnesToulet AgnesToulet marked this pull request as ready for review September 19, 2025 09:27
@AgnesToulet AgnesToulet requested review from heitortsergent and a team as code owners September 19, 2025 09:27
@AgnesToulet AgnesToulet requested review from inancgumus and codebien and removed request for a team September 19, 2025 09:27
@AgnesToulet AgnesToulet changed the title Browser: Add frameLocator APIs docs and locator.contentFrame Browser: Add getBy* APIs for frame, frameLocator and locator docs and locator.contentFrame Sep 19, 2025
Copy link
Contributor

@ankur22 ankur22 left a 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.

@AgnesToulet AgnesToulet merged commit ed34dfd into main Sep 19, 2025
9 checks passed
@AgnesToulet AgnesToulet deleted the add/getBy-and-frameLocator branch September 19, 2025 13:46

# 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.
Copy link
Collaborator

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?

Copy link
Contributor

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?

@heitortsergent heitortsergent mentioned this pull request Sep 19, 2025
7 tasks
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

Successfully merging this pull request may close these issues.

4 participants