AFC Posted January 21, 2014 Posted January 21, 2014 (edited) How can I pass objects property as variable like this ? $object = "span" $property = "innertext" $search = "Videolar " $oButton = _objectAra($oIE, $object, $property, $search) _IEAction($oButton, "click") Func _objectAra($oIE, $object, $property, $search) $oButtons = _IETagNameGetCollection($oIE, $object) For $oButton In $oButtons If $oButton.$property == $search Then Return $oButton EndIf Next EndFunc I just want to use something like $oButton.$property instead of $oButton.innertext I found a topic like this but I couldn't find/understand solution there '?do=embed' frameborder='0' data-embedContent>> Edited January 21, 2014 by AFC
Danp2 Posted January 21, 2014 Posted January 21, 2014 Have you looked at _IEPropertyGet? Latest Webdriver UDF Release Webdriver Wiki FAQs
Solution mikell Posted January 21, 2014 Solution Posted January 21, 2014 (edited) The answer is in the link you pointed to #include <IE.au3> $oIE = _IE_Example("basic") $property = "id" $property2 = "innertext" $oDivs = _IETagNameGetCollection($oIE, "div") For $oDiv In $oDivs If Execute("$oDiv." & $property) == "line1" Then Msgbox(0,"", Execute("$oDiv." & $property2)) Next Edit : typos Edited January 21, 2014 by mikell AFC 1
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