FindAllFrames - web automation method

Not available in Open Twebst edition!
Searches inside a web automation container object, the list of all HTML frame and iframe objects that verify a list of search conditions.

Applies to:
Browser, Frame
  var frameList = obj.FindAllFrames(Search conditions);
This method accepts a variable number of Search Condition arguments. If no search condition is provided, then the collection of all frame and iframe objects in the container is returned. Any HTML frame or iframe attribute is accepted in search conditions.
The method returns a FrameList web automation object containing frame and iframe objects that match the search condition arguments. If no frame and iframe object verifies the search conditions, then an empty list is returned.
In case of an error the method throws an IE macro exception and the lastError property of the core object is set as follows:
The time allocated for search is specified by the searchTimeout property. The search is affected by useRegExp 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 IE macro exception is thrown.

If the container object is a Browser, then the method searches the frames in all the frame and iframe DOM hierarchy of IE browser. If the container object is a Frame, then the method searches the frames in all the frame and iframe DOM hierarchy of the container Frame.
var coreObj    = new ActiveXObject("Twebst.Core");
var browser    = coreObj.StartBrowser("");

var textToDisplay = "";
var frameList     = browser.FindAllFrames();
for (i = 0; i < frameList.length; ++i)
	textToDisplay += frameList(i).nativeFrame.document.URL + "\n";
See also:
Frame | FindChildrenFrames | loadTimeout | searchTimeout | useRegExp

© 2014 CodeCentrix Software. All rights reserved.