Jump to content

Recommended Posts

Posted

Hello. First, I'd like to say what a great site and forum this is. I've gotten so much information from the brief time I've been working with AutoIt.

I'm attempting to create a script which logs into a website and runs a report, and need help selecting one of the menu pulldown links at the top of the page so that I can select one of the reports on the menu.

I have tried a number of ways, but all of my attempts to find and select the object have not worked. I think it is because the link lays deep within the DOM tree.

This is my reproduction in notepad of what the DOM tree looks like in DebugBar:

Document
  HTML
    HEAD
      TITLE
      META
      META
      LINK
      LINK
      SCRIPT
      SCRIPT
    BODY id=idBody
      DIV id=mainContent
        IFRAME
          HTML
            HEAD
            BODY id=bdyLandingPage
              DIV id=divTop
                SCRIPT
                SCRIPT
                SCRIPT
                TABLE
                  TBODY
                    TR
                    TR
                      TD
                      TABLE class=headerbackground
                      SCRIPT
                      STYLE
                      SCRIPT
                      SCRIPT
                      SCRIPT
                      SCRIPT
                      DIV id=menu0 class=mmenu
                        TABLE id=tbl0 class=milonictable
                          TBODY
                            TR
                              TD
                                DIV id=lnk0 name=mM1

I have tried gaining access to the link using name, text, or id lnk0 but have been unsuccessful.

I have even tried Send("{TAB}") a number of times, but this just skips right over the link.

Here is an example of one of the functions I've tried to use:

$oSubmit = _IEGetObjByName ($oIE, "mM1")
_IEAction ($oSubmit, "click")

And the warning and errors I receive are:

0070: 0-0: $oSubmit = _IEGetObjByName ($oIE, "mM1")

--> IE.au3 V2.4-0 Warning from function _IEGetObjByName, $_IEStatus_NoMatch (Name: mM1, Index: 0)

0071: 7-0: _IEAction ($oSubmit, "click")

--> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType

Thanks for any help.

Posted (edited)

Hi, reading up on some other postings regarding frames, I was able to find my solution using:

_IEFrameGetObjByName and then searching within this object for the links.

Edited by frus

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
  • Recently Browsing   0 members

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