Jump to content

Need a help in _IELinkClickByText function


Recommended Posts

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.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...