Jump to content

Trying to click on a link in IE <Resolved>


Recommended Posts

  • Moderators

I'm working on an internal website, where I need to move back and forth between several tabs off the main page. This is done after manually entering the credentials, so that part I do not want to touch. I don't do much with IE, but would like the movement between tabs if possible. Unfortuately, I haven't been able to click on the tabs through the usual IE methods. Curious if someone knows another way to select the item. I've tried IEGetObjByID/Name and IEGetLinkByID/Name, with no luck. Below is a screenshot of the tabs and the relevant source from the page. Any thoughts would be appreciated.

Source:

<div id="sitemenu">
                         <ul>
<li  class="selectedtab"><a href="https://www.mysite.org/index.html?option=nBZR&txtAccount=0010049080&sst=FXWlVsq8l1GG7SHPhZwLwxmt">Home</a></li>
<li ><a href="https://www.mysite.org/index.html?option=QBJrYBNQF&txtAccount=0010049080&sst=FXWlVsq8l1GG7SHPhZwLwxmt">Downloads</a></li>
<li ><a href="https://www.mysite.org/index.html?option=YBBXHC&txtAccount=0010049080&sst=FXWlVsq8l1GG7SHPhZwLwxmt">Lookup</a></li>
<li ><a href="https://www.mysite.org/index.html?option=PBrT&txtAccount=0010049080&sst=FXWlVsq8l1GG7SHPhZwLwxmt">Transfers</a></li>
<li ><a href="https://www.mysite.org/index.html?option=VrlBK&txtAccount=0010049080&sst=FXWlVsq8l1GG7SHPhZwLwxmt">Inbox </a></li>
<li ><a href="https://www.mysite.org/index.html?option=NQZVr&txtAccount=0010049080&sst=FXWlVsq8l1GG7SHPhZwLwxmt">Administration</a></li>
</ul>
Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Hi,

have you tried to loop through the links using _IELinkGetCollection?

#include <IE.au3>

$oIE = _IECreate("...URL here...")

$oDiv = _IEGetObjById($oIE, 'sitemenu')
$oLinks = _IELinkGetCollection($oDiv)
For $oLink In $oLinks
    ConsoleWrite($oLink.innerText & @CRLF)
;~  If $oLink.innerText == 'Home' Then _IEAction($oLink, 'click') ; click the tab or something
Next

Edited by Robjong
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...