How to select element from hoverable dropdown menu? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
glen
Posts: 2
Joined: 22 Jul 2018, 11:09

How to select element from hoverable dropdown menu?

22 Jul 2018, 13:47

I'm trying to select an element in a hoverable dropdown menu.

I tried just using .click() on the item inside the menu, but that didn't work. ahk didn't know what element I was referring to.

Normally I would just tell it what element I'm referring to by getElementById(), getElementsByClassName(), getElementsByName(), but those aren't there so I have to use getElementsByTagName() and then use the [] operators to select the appropriate index.

However my theory is that because the element I'm referring to is in the hoverable dropdown menu, it isn't yet known until the menu is open. So no matter what index I select, I won't get it unless the menu is open.

So I need to open the menu. But I can't do that either, because it's a "hoverable" dropdown menu. Using .click() won't work. I need to simulate a mouse hovering over the menu for the menu to open, and then click the element in the menu.

How do I simulate a mouse hovering over a menu in ahk?
glen
Posts: 2
Joined: 22 Jul 2018, 11:09

Re: How to select element from hoverable dropdown menu?  Topic is solved

22 Jul 2018, 15:59

It turns out I did not need to open up the menu. I just needed to let the page load fully. I did that by doing

sleep 1000

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: CuriousDad, rc76 and 235 guests