Jump to content

IE and getting infro from a tagname that has "-" inside.


Go to solution Solved by FireFox,

Recommended Posts

How do I get the "data-toggle" value from a link like this:

<a href="www.google.com" title="" data-toggle="True">google</a>

?

And I'm getting all the link elements using:

Local $AllLinks = _IETagNameGetCollection($oIE, 'a')
For $theLink in $AllLinks
If $theLink.data-toggle = 'True' then MsgBox(0, '', 'Toggle is True')
Next

however, I do not know how to form that $AllLinks.data-toggle, since autoit cannot form data value such as that.

Edited by dragan
Link to comment
Share on other sites

  • Solution

Perhaps

If $theLink.&"data-toggle" = 'True'

These are objects, you can not manipulate them by this manner.

@dragan

#include <IE.au3>

$oIE = ...

Local $oLinks = _IETagNameGetCollection($oIE, "a")
For $oLink In $oLinks
    ConsoleWrite($oLink.getAttribute("data-toggle") & @CrLf)
Next

_IEQuit($oIE)
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...