Support > Forums > OpenBots Studio > Native Browser - Dropdown Selection

Native Browser - Dropdown Selection

Mohammed Al Mogary

  • Reporter
  • Calender Icon October 17,2021 at 8:27 PM

I have a dropdown menue which I need to make a selection from. When you make a selection, the page automatically runs a script (using onchange() ). How can I use the OpenBots Studio to do that. I tried the following:

  • Used Set Option Element: That set the option and did the right selection but the script did not run
  • I tried Click Element: That did not do anything.

I would appreciate any help or direction to resolve this.

Thank you

This forum has 314 topics, 681 replies, and was last updated 6 days ago by Support Agent

Nataly Alvarado...

  • Participant
  • Calender Icon November 07,2022 at 7:19 PM

Hi Mogarymo,

To interact with dropdowns we recommend using the Native Browser Set Option command. This will allow you to select an option based on index or name. Keep in mind that this is only supported if the html element is Select type

Another thing to keep in mind is that the Set text and click commands have two modes available: simulate and manual. Simulate type interacts with elements through background processing, while manual type mimics the actions a user would perform by physically moving the mouse to the element's coordinates. In the case you are describing, the script might only be triggered by manual actions, so you could try a manual click to select the option.

Additionally there is a command available called Native Browser Inject JS. This can be used to trigger the javascript function.

Let me know if any of these suggestions work. Else, if the site is publicly available, I could take a closer look and investigate other alternatives.

Thanks!

Dominic Duke

  • Participant
  • Calender Icon November 07,2022 at 4:59 PM

I have the same sort of issue. I have openbots inputting text into a website field, and the website I think has some javascript running that auto populated a dropdown beneath the text entry field. I need openbots to select the first entry in that autopopulated list. Ive tried sending keystrokes (down + enter), but doing this eliminates the text I entered in the field and the dropdown list disappears. I also tried clicking on the first element in the dropdown, but again, that eliminated the text. I cant figure out how to get openbots to select this field. The send keystrokes method works in Power Automate, so I know its possible - just not sure if OpenBots supports it.

Kriti Sinha

  • Participant
  • Calender Icon October 27,2021 at 2:48 PM

Hello , Mohammed Al Mogary The select option action allows you to select combo box value depending on index or text but set option command will only change the value it will not invoke any event ,Try using Mouse click .

You are not authorized to reply, please click here to login and add your reply to this topic.