FindFrame - web automation method
Searches inside a container object, an HTML frame or iframe that verifies a list of Search Conditions.
- Browser, Frame
var f = obj.FindFrame(Search conditions);
This method accepts a variable number of Search Condition arguments.
If no search condition is provided, then the first frame in the container is returned.
Any HTML frame or iframe attribute is accepted in search conditions.
A special zero-based index attribute is allowed in search condition specifying the ordinal position in the collection of objects generated by the remaining search conditions.
The method returns a web automation Frame object that matches the search condition arguments and provides programmatic control over the underlying IHTMLWindow2 native object exposed by IE browser.
If no frame verifies the search conditions, then null is returned.
In case of an error the method throws a script exception and the lastError property of the core object is set as follows:
The time allocated for search is specified by the searchTimeout property.
If loadTimeout is not zero, then the method waits the browser objects to be completely loaded in the amount of time specified by the property.
If the timeout has expired the lastError property is set to LOAD_TIMEOUT_ERROR. In this case, if loadTimeoutIsError property is true,
then a script exception is thrown.
If the container object is a Browser, then the method searches the frame in all the <frame> and <iframe> hierarchy of the browser.
If the container object is a Frame, then the method searches the frame in all the <frame> and <iframe> hierarchy of the container frame.
var coreObj = new ActiveXObject("OpenTwebst.Core");
var browser = coreObj.StartBrowser("http://codecentrix.blogspot.com/");
var firstFrame = browser.FindFrame("");
- Frame | FindChildFrame | loadTimeout | searchTimeout
2017 CodeCentrix Software. All rights reserved.