Jump to content

Trying to click a link within DIV


Recommended Posts

Hello,

I am trying to click the link in the image highlighted with the red box. I am doing something wrong because I am getting no where. Any help would be appreciated.

 

$oDivs = _IETagNameGetCollection ($oIE, "div")
For $oDiv in $oDivs
If String($oDiv.classname) = 'resource myapps-myfolder' And String($oDiv.innerText)= 'Cert' Then
_IEAction($oDiv, "click")
ExitLoop
EndIf
Next

 

image.png.6f9bb9d14d5da5cf22194c135fd71a7c.png

Link to post
Share on other sites

1) We can't read your mind, so it would help if you posted the results from the Scite Output panel. ;)

2) The code you posted clicks the div, not the actual link

3) Have you tried something like this?

$oDiv = _IEGetObjById($oIE, "myapps-container")
_IELinkClickByIndex($oDiv, 0)

That may not work because I'm unsure if _IELinkClickByIndex will accept a Div element as the first parameter. If not, then try this --

$oDiv = _IEGetObjById($oIE, "myapps-container")
$oLink = _IETagNameGetCollection($oDiv, "a", 0)
_IEAction($oLink, "click")

 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...