LurchMan 2 Posted September 13, 2010 Hey everyone - I'm working on automating a website and I can't get it to click this link: <td class="primaryNav" width="*" nowrap="nowrap" id="antiSpam"> <a href="policy/spam/viewSpamPolicy.do" onclick="selectPrimaryNavLink('antiSpam')"> I've tried using _IECLinkClickByText (), _IECLinkClickByID () and _IEGetObjByID () with _IEAction (). When I use _IEGetObjByID () it successfully gets the Obj but it doesn't click it. Neither function is reporting an error either. Any help will be greatly appreciated! Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end. Share this post Link to post Share on other sites
notsure 0 Posted September 13, 2010 (edited) _IENavigate($oIE, "javascript:selectPrimaryNavLink('antiSpam')", 0); ? Edited September 13, 2010 by notsure Share this post Link to post Share on other sites
Juvigy 49 Posted September 13, 2010 Are you sure it gets the correct object? There maybe more objects with the same ID. it is possible there are frames too. Did you try _IELinkGetCollection and loop them with Consolewrite($element.innerhtml&@crlf) + counter to see which elemnt you need? Share this post Link to post Share on other sites
LurchMan 2 Posted September 13, 2010 Thank you for the reply - I did not know you could run java script like that with he _IE functions. Although this did not do it either - it showed the link has focus but does not go to the page. Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end. Share this post Link to post Share on other sites
LurchMan 2 Posted September 13, 2010 Are you sure it gets the correct object? There maybe more objects with the same ID.it is possible there are frames too. Did you try _IELinkGetCollection and loop themwith Consolewrite($element.innerhtml&@crlf) + counter to see which elemnt you need?I've looked through the source of the web page and I didn't see another object with the same ID...However my tired brain looked over this idea, and using the _IELinkClickByIndex with the index i got from your suggestion worked...Thank you for your help. Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end. Share this post Link to post Share on other sites
Juvigy 49 Posted September 13, 2010 Glad i could help. Share this post Link to post Share on other sites