IFRAMES and COM/DOM help

Get help with using AutoHotkey and its commands and hotkeys
gonzoson
Posts: 2
Joined: 26 Jan 2019, 10:25

IFRAMES and COM/DOM help

26 Jan 2019, 10:59

I am having a difficult time with getting an InnerText, OuterHTML or anything from an element on a website, which has 3 frames on it.

For a webpage that didnt have any frames, I was able to use the code below to get the inner text

Code: Select all

wb := IEGet("collections")
balance := wb.document.GetElementsByTagName("SPAn")[20].InnerText
This worked like a charm. My next objective was to click on a element on the webpage that iWB2 Learner tool said had 2 Iframmes https://imgur.com/a/dyzLHUy. I did this with the following command.

Code: Select all

wb := IEGet("AdvancedMD PM")
wb.document.parentWindow.frames("Dashboard")[2].document.all.tags("Span")[156].click()
Now my third objective is to read the value of the following dropdown menu: https://imgur.com/a/gtNhawb I thought I can do this with the following command

Code: Select all

var := wb.document.GetElementsByTagName("SPAn")[20].Value
But this is doesnt work and I suspect this is because, in this menu there are now 3 IFrame according to iWB2. The first two IFrames are the same as above but the third is different https://imgur.com/a/clMhi9S. I have tried every possible combination of numbers or name of frames in the following command

Code: Select all

wb.document.parentWindow.frames("Dashboard")[2].document.all.tags("Select")[0].Value
But had no luck. Can someone please point me in the right direction.

Return to “Ask For Help”

Who is online

Users browsing this forum: flyingDman, Google [Bot], Helgef and 188 guests