-
Notifications
You must be signed in to change notification settings - Fork 487
fix: add an option value to the snapshot #237
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
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks! Let us use conventional commits for the PR title.
I think we should do the approach we discussed previously in which we resolve option label to a value when we will out an option. WDYT? I think doing evals during snapshot generation would be too expensive and bug-prone
Do you mean check if it is an option within |
src/tools/input.ts
Outdated
await handle.asLocator().fill(request.params.value); | ||
// The AXNode for an option doesn't contain its `value`. We set text content of the option as value. | ||
// To fill the form, get the correct option by its text value. | ||
const isSelectElement = await handle.evaluate( |
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.
Could we lookup the a11y node by uid in the snapshot instead and check if it is an option?
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.
the uid here is not for the option, but for a selector element.
We can look up that selector element by uid and check which of its childen value matches the one we are looking for. We still need to get its Element since we need to get the value that does not exist in the AXNode.
I changed it to do that
Fixes #185
The standard selector value is not included in the AXNode, so add it separately.