Jump to content
Sign in to follow this  

Trouble selecting link in <div

Recommended Posts


I’m trying to use AutoIT to go to a URL and select a link on the page. When I view source the link is in a <div. I'm trying to select the link associated with the 'login'

Here is my code:

#include <IE.AU3>
$oIE = _IECreate ("URL")
$oDiv =_IEGetObjById  ($oIE, "login")
_IEAction ($oButton, "focus")

and here is the section of the page's source:



<div id="login">

<div class="moduletable">

<div class="custom" >


<a class="storeopen" link="CustSignIn.aspx">

Sign In


&nbsp; |&nbsp;

<a class="storeopen" link="ShoppingCart.aspx">

<img src="/images/icons/cart_icon_orange.gif" border="0" style="border: 0; vertical-align: baseline;"/>

My Cart


&nbsp; |&nbsp;

<a class="storeopen" link="ShoppingCart.aspx" link="ShoppingCart.aspx">















Any ideas on what I'm doing wrong?



Share this post

Link to post
Share on other sites

You are assigning the same <div> to both $oDiv and $oButton, for a start.

It would help to see the full source. Also you don't actually say which link you are trying to activate.

I'm not familiar with IE.AU3, but I suspect there is an easier method than this.

And, AutoIt code inside code tags, please!

;o) Cor

nothing is foolproof to the sufficiently talented fool..

Share this post

Link to post
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
Sign in to follow this  

  • Create New...