Skip to content
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

select() to select by option text in addition option value - sync upstream [done] #245

Closed
kensoh opened this issue May 3, 2021 · 1 comment
Labels

Comments

@kensoh
Copy link
Member

kensoh commented May 3, 2021

aisingapore/TagUI#1001 - aisingapore/TagUI@c7b62db


TagUI's select step helps users select options. The default design assuming best web design practices is to select using the value attribute. This is because value is the 'source-of-truth' that gets submitted when someone submits a form.

See this page from W3Schools on option value - https://www.w3schools.com/tags/att_option_value.asp

Screenshot 2021-04-08 at 1 29 17 PM

However, using value is non-intuitive for a non-developer user because 'value' is not something that is visible on the screen. Only text is visible. Furthermore, sometimes 'value' is some unique number that has nothing to do with the text of the option being selected. A TagUI workflow would be hard to understand in such situation what is being selected.

After thinking through, the best approach should be matching by value but should that fail, then match by text. It is not advisable to match by text first because 'value' is still the unique source-of-truth when submitting a form. But having this fallback should open up new use cases without causing problems for existing users use cases.

@kensoh kensoh added the feature label May 3, 2021
kensoh added a commit that referenced this issue May 12, 2021
@kensoh
Copy link
Member Author

kensoh commented May 12, 2021

This is added in v1.33, available with pip install rpa --upgrade

Validated with the following -

r.url('https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_option_value')
r.frame('iframeResult')
r.select('cars','Saab 95')
r.select('cars','audi')
r.select('cars','saab')
r.select('cars','Audi TT')

@kensoh kensoh changed the title select() to select by option text in addition option value - sync upstream change select() to select by option text in addition option value - sync upstream [done] May 12, 2021
kensoh added a commit that referenced this issue May 12, 2021
@kensoh kensoh closed this as completed May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant