Better way to only update a select box if empty but leave filled boxes alone? #597
Unanswered
lorenz-ilab
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to only update a select box is the select is empty or space " ". Skip if it is already selected.
//select[@id="appAuthEnrollCenter"][@selectedIndex = 0]//select[@id="appAuthEnrollCenter"][@value = " "]//select[@id="appAuthEnrollCenter"][@value = ""]gives an error "Action 124 [selectedtest] No element found with the given selector skipped"
The following works for already filled in boxes.
select[@id="appForSplPgm"]/option[contains(@value,"N") and @selected]but not for unselected value boxes. Since the option space is not really selected just the first item in the list.The boxes are typically empty but sometimes "Y" which can't be changed. I need to change blanks to N and leave Y to Y.
I figured out how to do this on input box already but the combo (select) boxes are stumping me.
//input[@id="city"][@name="city"][@value=""]works fine.I also went down the path of checking if the "Y" option is found. then later using an "Action condition" It works for Yes/No/Blank but more options it adds another line for each option.
//select[@id="appForSplPgm"]/option[contains(@value,"Y") and @selected]valueYes(value maybe not needed)//select[@id="appForSplPgm"]valueNowith Action ConditionAction =
//select[@id="appForSplPgm"]/option[contains(@value,"Y") and @selected]Status = "SKIPPED" Action = "Skip Action"Ray
in the console the properties for the appAuthEnrollCenter element has a
value : space
selectedIndex = 0
Page code I added the Historcal option for discussion.
Already selected code
Beta Was this translation helpful? Give feedback.
All reactions