Reputation: 1
I need help with Automation Anywhere
< option selected="selected" value="">< /option >
< option value="0001">EUA OPT (0001)< /option >
< option value="0002">BRA OPT (0002)< /option >
< option value="0003">GER OPT (0003)< /option >
I want the second option, BRA OPT (0002). In "Web Recorder" in the "Manage Web Controls" command there is a functionality to work with Drop-Down List. I can select the desired option for the "Select Item By Text" action, but it is only possible when I enter the full text -> BRA OPT (0002).
How do I make the chosen option be selected by entering only the value? value = "0002"
Thank you.
Upvotes: 0
Views: 4663
Reputation: 1
Will select the value from Select item by text after performing the manage web record command. Select item by text will give the exact value of the drop down which is present in the application. Another option is get the value which we want to select in drop down from any config file into a variable and then pass the same variable in **select item by text option.**
Upvotes: 0
Reputation: 33
You won't need to do so much to get what you need here. Automation Anywhere "Select Item by Text" works wonderfully with asterisk symbol ( * ).
If you want your robot to always select the second option regardless of its text value: Use "Select Item By Text" and put *0002* as value (including asterisks on both sides). Or you could use *0002) to have hard match on value ending with 0002).
Upvotes: 0
Reputation: 161
First idea that comes to my head is to "click" drop-down list with Object cloning, after that take the whole text from that list with Object cloning into variable_1. Search inside variable_1 for value that you are interested in, in this case "0002" and make some kind a regular expression to pick value of list element that you want. String operation before-after variable_1 before ")" after "(0002)" so will return you half of value of element you are looking for assign it to variable_2.
Result will be:
Last step is to concatenate variable_2 with "0002" and pass it to "Web Recorder.
Upvotes: 1