Jump to content
Paranthaman

Need a help in _IELinkClickByText function

Recommended Posts

Paranthaman

Hi all,

I am new to AUTOIT and i doubt this would be a silly doubt to ask ,but as i was not able to figure it out for more than a day I am asking here

I'm having trouble in using _IELinkclickbytext function .I am trying to click a link with the following html syntax but not able to do.

HTML Code

<span class="actionLinks ">
<a class="actionItemName" href="/console/analyze/addtoquickanalysis.do?id=26041672&structureid=SYS&appid=2279" title="Add to Quick Analysis">CPU <wbr></wbr>Util<wbr></wbr>izat<wbr></wbr>ion <wbr></wbr>%</a>
</span>

Auto IT code I used

 

Local $sMyString = "CPU"
Local $oLinks = _IELinkGetCollection($oIE)
For $oLink In $oLinks
    Local $sLinkText = _IEPropertyGet($oLink, "innerText")
    If StringInStr($sLinkText, $sMyString) Then
        _IEAction($oLink, "click")
        ExitLoop
    EndIf
Next

 

Can anyone help me where i am wrong.

 

Share this post


Link to post
Share on other sites
Danp2

Your thread title mentions _IELinkClickByText, but that isn't in your code. Also, you didn't explain what didn't work in the code. Did it not find the link? Were there any errors shown in the output window? Etc.

Also, have you checked to see if the site uses Frames?

Share this post


Link to post
Share on other sites
Paranthaman

Hi Danp2,

Updated the questions with more clarity,details and attached HTML code for reference.

Thanks

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

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.