msroehrs Posted July 18, 2014 Share Posted July 18, 2014 Hi! 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") $oButton=_IEGetObjById($oIE,"login") _IEAction ($oButton, "focus") _IELoadWait($oIE,5) and here is the section of the page's source: <div id="login"> <div class="moduletable"> <div class="custom" > <p> <a class="storeopen" link="CustSignIn.aspx"> Sign In </a> | <a class="storeopen" link="ShoppingCart.aspx"> <img src="/images/icons/cart_icon_orange.gif" border="0" style="border: 0; vertical-align: baseline;"/> My Cart </a> | <a class="storeopen" link="ShoppingCart.aspx" link="ShoppingCart.aspx"> Checkout </a> </p> </div> </div> </div> Any ideas on what I'm doing wrong? Thanks Link to comment Share on other sites More sharing options...
corz Posted July 19, 2014 Share Posted July 19, 2014 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.. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now