Skip to content

chore: support custom testIdAttribute #628

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mxschmitt
Copy link
Member

@mxschmitt mxschmitt commented Jul 3, 2025

This will allow users to set a custom testId which is helpful for projects relying on a different one. Especially with testing use-cases where generation from existing code/text/logic is happening.

@mxschmitt mxschmitt requested a review from dgozman July 3, 2025 13:41
@mxschmitt mxschmitt force-pushed the support-test-id-attribute branch from f1cabdd to 3cbd555 Compare July 3, 2025 13:44
@pavelfeldman
Copy link
Member

How would LLM know the test id to generate?

@mxschmitt
Copy link
Member Author

mxschmitt commented Jul 4, 2025

How would LLM know the test id to generate?

This changes the selector we return on e.g. a click by a ref. Previously if the mycorp.com has used data-testid we already returned getByTestId. With this PR custom testIdAttributes are supported and are returned as getByTestId as well. So the LLM just uses what the MCP server (click) previously returned.

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.

2 participants