Jump to content
Sign in to follow this  

How to select(click) a HTML list element

Recommended Posts



I'm trying to click on other elements of a list but with no success till now. post-39381-0-23242400-1339572140_thumb.p

Any idea? ;)

Here is my code:

#include <IE.au3>[/color][/font]
[font="helvetica, arial, sans-serif"][color="#282828"]$oIE = _IECreate("...")[/color][/font]
[font="helvetica, arial, sans-serif"][color="#282828"]$aArray = _IEGetObjByClass($oIE, "carousel_item_wrapper", "li")[/color][/font]
[font="helvetica, arial, sans-serif"][color="#282828"]$o = $aArray[2]
MsgBox(0, "test", $o.innerText,1 )
_IEAction($o, "click");!!!!!no working[/color][/font]
[font="helvetica, arial, sans-serif"][color="#282828"]
Func _IEGetObjByClass($oIE, $sClass, $sTag = "*")
    Local $aRet[1] = [0][/color][/font]
[font="helvetica, arial, sans-serif"][color="#282828"]  Local $allHTMLTags = _IETagNameGetCollection($oIE, $sTag)
    For $o In $allHTMLTags
        If IsString($o.className) And $o.className = $sClass Then
            $aRet[0] += 1
            ReDim $aRet[$aRet[0] + 1]
            $aRet[$aRet[0]] = $o
[font="helvetica, arial, sans-serif"][color="#282828"]  Return $aRet
EndFunc   ;==>_IEGetObjByClass
Edited by jandos

Share this post

Link to post
Share on other sites

When you post please use the post editor to put your code in a codebox. The "A" button on the second row or "<>" for other code. That way it'll have syntax highlighting. ;)

  • Like 1




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  


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.