FindAllBrowsers - web automation method

Not available in Open Twebst edition!
Connects a BrowserList IE automation object to multiple instances of Internet Explorer browser that verify a list of Search Conditions.

Applies to:
  var browserList = coreObj.FindAllBrowsers(Search conditions);
This method accepts a variable number of Search Condition arguments. The following attributes are accepted in search conditions:
The method returns a IE automation library BrowserList object. The Browser objects in the list match the search condition arguments. If no browser 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:
If loadTimeout is not zero, then the method waits all browser objects in the list 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 web macro exception is thrown.
The search is affected by useRegExp property.

APP attribute is not affected by useRegExp property and is case insensitive. The default value is iexplore.exe and * stands for any application (including IE).
// Find all browsers by using a regular expression.
// Do not wait the browsers in the list to be completely loaded.
// Close all the browsers in the list.
var coreObj         = new ActiveXObject("Twebst.Core");
coreObj.loadTimeout = 0;
coreObj.useRegExp   = true;

var browserList = coreObj.FindAllBrowsers("title=.*");
for (i = 0; i < browserList.length; ++i)
See also:
Core | BrowserList | FindBrowser | foregroundBrowser | loadTimeout | useRegExp

© 2014 CodeCentrix Software. All rights reserved.