[python-win32] Clicking an li tag in Internet Explorer

Blake Willmarth bwillmarth at gmail.com
Fri Mar 18 01:39:22 CET 2011


I was wrong about them being links, the method does work as intended and I
was able to click the correct one using the className attribute:

    liTags = ie.Document.getElementsByTagName("li")
    for i in range(liTags.Length):
        if liTags[i].className == "NextEnabled":
            liTags[i].Click()

Sorry.

On Thu, Mar 17, 2011 at 8:13 PM, Blake Willmarth <bwillmarth at gmail.com>wrote:

> Hello,
>
> I am having trouble navigating the MS documentation to find out how to
> click an <li> element. I only have the class attribute name as the
> identifying feature: <li class="NextEnabled" onclick="..."/>
>
> The one hope I had was ie.Document.getElementsByTagName("li") but this
> seems to be only getting <a> tags.
>
> Any pointers would be really appreciated.
>
> Thanks,
> Blake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20110317/912e5bc0/attachment.html>


More information about the python-win32 mailing list