Jump to content

Recommended Posts

Posted

Hi guys,

reading >this topic I discovered there is no way to get the "class" attribute value of an object using only IE Management UDF.

For example, www.google.com had a DIV element with class = "ctr-p".

If I run this script

#include <IE.au3>
$oIE = _IECreate("http://www.google.com", 0, 0, 1, 0)

$tags = _IETagNameGetCollection($oIE, "div")
For $tag In $tags
    $class_value = _IEPropertyGet($tag, "class")
    If String($class_value) = "ctr-p" Then
        ConsoleWrite("Object tried" & @CRLF)
        ExitLoop
    EndIf
Next
_IEQuit($oIE)
 

I get "IE.au3 T3.0-1 Error from function _IEPropertyGet, $_IESTATUS_InvalidValue (Invalid Property)" error.

This error comes out because _IEPropertyGet has very few property related to DOM object, and Class attribute is not supported (we need to use GetAttribute method to retrieve that one).

Can it be implemented by the next version of Autoit?

If that attribute can be retrieved using only IE management UDF please tell me the right way :)

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
×
×
  • Create New...