Sign in to follow this  
Followers 0
LurchMan

IE Help

6 posts in this topic

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



#2 ·  Posted (edited)

_IENavigate($oIE, "javascript:selectPrimaryNavLink('antiSpam')", 0);

?

Edited by notsure

Share this post


Link to post
Share on other sites

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

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

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?

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

Glad i could help.

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  
Followers 0