Athos Posted September 7, 2012 Posted September 7, 2012 Hi guys. I'm having difficulty trying to detect if an object is loaded. So basically, I want to imitated the _IELoadWait() Method, but instead, I want to wait until a particular object appears on the screen. In the past I was able to do this by looking for a particular link, but with this current webpage, all I have access to are 2 objects. <INPUT TYPE="button" NAME="a_button" VALUE="I accept"> <INPUT TYPE="button" NAME="b_button" VALUE="I don't accept"> So I need to wait until either of these buttons is clickable, but I'm really not sure how. There doesn't appear to be a collection for objects. There is a form element one, but these objects don't have a form that I can reference.
JohnOne Posted September 7, 2012 Posted September 7, 2012 _IETagNameGetCollection() Maybe. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
jdelaney Posted September 7, 2012 Posted September 7, 2012 Get the attributes of the object when disabled, and enabled, and then perform a loop, looking specifically for the node to include the enabled attribute. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Athos Posted September 7, 2012 Author Posted September 7, 2012 (edited) Get the attributes of the object when disabled, and enabled, and then perform a loop, looking specifically for the node to include the enabled attribute. Are we supposed to do this all with IEPropertyGet? Edited September 7, 2012 by Athos
jdelaney Posted September 7, 2012 Posted September 7, 2012 (edited) Use IE Developer Tools to view the html source of the given object, in both states (though, more importantly when active).Then use the _IE* functions to zero in on it.good place to start:http://www.w3schools.com/htmldom/dom_methods.asp Edited September 7, 2012 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Athos Posted September 7, 2012 Author Posted September 7, 2012 (edited) I don't get what it means when _IEPropertyGet($agreeB, "isdisabled)=0. It fails, so does that mean its enabled? If so then, why can't I click it right away?? Edited September 7, 2012 by Athos
Athos Posted September 7, 2012 Author Posted September 7, 2012 Also I can see the source of the given object, it's just I don't think there are any attributes to manipulate.
ame1011 Posted September 7, 2012 Posted September 7, 2012 We need more specifics here. When the page finishes loading, are these items also loaded with the page? (i.e. Are they loaded normally or via ajax) Are you waiting for the objects to load/exist or are you waiting for them to become 'enabled' from a 'disabled' state? [font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]
Athos Posted September 14, 2012 Author Posted September 14, 2012 ame1011, I am waiting for the objects to laod/exist. These objects do load with the page, my problem is waiting until they are in fact loaded.
jdelaney Posted September 14, 2012 Posted September 14, 2012 (edited) Create your own UDF, that uses the given _IE* functions, that performs a loop until found, or fails something like WaitForIEElement ( $oIE, $ID, $iMaxWaitTime, $iChecks ) Edited September 14, 2012 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
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