Problem with drop-down menu in UI application

Hello everybody!

I’m trying to develop a robot that downloads XML files for a company. To do this, it needs to access an application and navigate within it. When navigating the application, it needs to access some options within a drop-down menu, as you can see below

But, these menus open and close dynamically. And every time I open the application, some drop-down may or may not be open. This causes the Robot to not be able to find the element every time. How do I resolve this?

Hi!

Check if you can interact with the option within the drop-down menu while it is still hidden using Simulate Click: How to effectively use Simulate Click and Simulate Type? - Help / Activities - UiPath Community Forum
Be aware that it might not work, it will vary from application to application.

If that does’nt work you will have to make something which detects if your option is available or not, and then clicking the drop-down menu to make it appear.
To do this you will have to use Check App State:
Activities - Check App State (uipath.com)

Try Catch - Handle exceptions caused by the drop-down closing unexpectedly.

Thanks,
Muthuraj

Hello

You should use a modern Click-activity with validation on if the underlying menu item appears, and then set “Retry” to True.
This will make the robot click the overlying menu item untill the underlyding menu item is visible.

Remember to use:

  • Visibility check: Fully visible
  • Wait for page load: Complete

See example below:

Example file here:
Dropdown.xaml (10.3 KB)

You should be able to run the file on my post here, and it will expand the “Summary” below, until the text “This text will be hidden” is visible.

Summary

This text will be hidden

Regards,
Soren

1 Like

Thanks a lot! The second one helped me solve

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.