Hello I’ve been working on a SAP automation and I’m trying to change an item inside a drop down. I’ve tried many things like the activity select item (normal), select item (sap), only through click activities or table cell scope, but it wont work.
When I try to use a select item I get this error:
Select Menu Item ‘ComboBox Reason’: Exception from HRESULT: 0x80040461
You can use the Ui activities to select the option in dropdown.
→ Use first click activity to click on the dropdown to expand it.
→ After that use the for each Ui element activity and indicate the options of dropdown.
→ Inside for each insert the Get attribute activity and select the attribute which contains the options and save in a String Variable, let’s call the variable name as OptionVar.
→ After Get attribute insert the If condition to check the condition
- Condition -> OptionVar = "Option to select"
→ Inside If condition insert the click activity and pass the CurrentElement in the Input element option in properties of click activity.
The process will execute first click on dropdown iterate through each option in dropdown If condition reaches it select the option in dropdown.
Hope it helps!!
Yeah it is very helpful, but I’m working with the classic experience and I think I don’t have the for each Ui element activity. Is there anyother way?
Instead of using the for each Ui element use the Table extraction to extract the options as datatable. Output → dt_Extracted.
→ After Table extraction use for each row in datatable activity to iterate the each row in the datatable.
→ Inside for each insert the If condition to check the condition
- Condition -> Currentrow(0).toString.equals("Option to select")
→ Inside If condition insert the assign activity to store the value in a String datatype Variable
called as Str_option.
- Assign -> Str_option = Currentrow(0).toString
→ After assign activity use the click activity and select one option from the dropdown, when indicating the element check the strict selector and uncheck the fuzzy and image.
→ Open the properties of click activity and open the strict selectors and open the Ui explorer and select the attribute which contains the option value, replace the value with Str_option variable and validate.
It will work like for each Ui element.
Hope you understand!!
I hope this method give you a solution for your query.
If yes, Make mark it as solution which helps for other forum members.
Happy Automation!! @lujanlon
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.