j0kky Posted September 22, 2014 Share Posted September 22, 2014 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 Spoiler Some UDFs I created: Winsock UDF STUN UDF WinApi_GetAdaptersAddresses _WinApi_GetLogicalProcessorInformation Bitwise with 64 bit integers An useful collection of zipping file UDFs Link to comment Share on other sites More sharing options...
JohnOne Posted September 22, 2014 Share Posted September 22, 2014 I believe a property and an attribute are different things, I doubt it's wise to mix the the two up. And as you say it's trivial to do what you want using GetAttribute . AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
j0kky Posted September 22, 2014 Author Share Posted September 22, 2014 Mmm you're right, maybe it can be added a kind of _IEAttributeGet function Spoiler Some UDFs I created: Winsock UDF STUN UDF WinApi_GetAdaptersAddresses _WinApi_GetLogicalProcessorInformation Bitwise with 64 bit integers An useful collection of zipping file UDFs Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now