Jump to content

How to access page link/button


KAD
 Share

Recommended Posts

Hi,

I have read a lot of the posts around this topic and have also tried to put together a script that allows me to print out the DIV's of the page, but haven't figured out how to enter each DIV to actually be able to get to the SPAN and click it. I have taken a screenshot of what Debugbar is giving me, but haven't got the slightest clue on how to get to the SPAN and what functions to use in the IE.au3 to accomplish the task.

Please find attached my code and tree-structure image.

The code:

$oFrame = _IEGetObjById($oIE, "canvas_frame")
$sSrc = $oFrame.src
$sSrc = "https://www.someurl.com/"&$sSrc
$oIE2 = _IECreate($sSrc)
$sHTML = _IEDocReadHTML ($oIE2)

$file = FileOpen("C:\frames_debug.txt", 2)
$oDivs = _IETagNameGetCollection ($oIE, "DIV")
For $oDiv In $oDivs
    $test = _iepropertyget($oDiv, "innerhtml")
    FileWrite($file, $test)
Next
FileClose($file)

The image:

post-52265-12503343664512_thumb.png

Thanks in advance,

/KAD

Link to comment
Share on other sites

Hi,

I have read a lot of the posts around this topic and have also tried to put together a script that allows me to print out the DIV's of the page, but haven't figured out how to enter each DIV to actually be able to get to the SPAN and click it. I have taken a screenshot of what Debugbar is giving me, but haven't got the slightest clue on how to get to the SPAN and what functions to use in the IE.au3 to accomplish the task.

Please find attached my code and tree-structure image.

The code:

$oFrame = _IEGetObjById($oIE, "canvas_frame")
$sSrc = $oFrame.src
$sSrc = "https://www.someurl.com/"&$sSrc
$oIE2 = _IECreate($sSrc)
$sHTML = _IEDocReadHTML ($oIE2)

$file = FileOpen("C:\frames_debug.txt", 2)
$oDivs = _IETagNameGetCollection ($oIE, "DIV")
For $oDiv In $oDivs
    $test = _iepropertyget($oDiv, "innerhtml")
    FileWrite($file, $test)
Next
FileClose($file)

The image:

Thanks in advance,

/KAD

Where exactly does it fail to do what you want? I wonder if you meant to get the DIV tag collection from $oIE2 (the frame) vice $oIE?

>_<

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...