Jump to content

Issues with _IELinkClickByText


Recommended Posts

Hi,

I am trying to click a link on a web page but it doesn't work. I tried using the "_IELinkClickByText", and also "_IEAction($pasMatcha, "click")". Neither of them seems to work.

THe clikable link loads after filling in the form and clicking on the "Submit" button.

 

 

Code: 

$oIE = _IECreate("---------") ; "cant provide the url"

$meterType = _IEGetObjByName($oIE, "meterType")

$siteId = _IEGetObjByName($oIE, "siteId")

$submit = _IEGetObjById($oIE, "submitWMResult")

$pasMatcha = _IEGetObjById($oIE, "pasMatcha")

_IEPropertySet($siteId, 'innerText', '1')

_IEAction($meterType, "focus")

_IEPropertySet($meterType, 'innerText', 'NANO')

_IEAction($submit, "click")

Sleep (5000)

;_IELinkClickByText ($oIE, "PAS Match")
_IEAction($pasMatcha, "click")

 

Link to comment
Share on other sites

  • Moderators

Moved to the appropriate forum. Please pay attention to where you post in the future by reading the forum headers; the DEV forum very clearly states:

Quote

Do not create AutoIt-related topics here, use AutoIt General Help and Support

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

It makes sense that _IEAction doesn't work.  After the form is submitted, you probably have new DOM objects loaded.  $pasMatcha = makes more sense after the form submit/sleep.

Did you copy the "text" from html after the form was submitted that you wanted to search for or are you just assuming what you see is what the text is (could have special characters)?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...