FindBrowser - web automation method
Connects a web automation Browser to an existing instance of Internet Explorer object ( IWebBrowser2 ) that verifies a list of Search Conditions.
var b = coreObj.FindBrowser(Search conditions);
This method accepts a variable number of Search Condition arguments.
The following attributes are accepted in search conditions:
TITLE condition on the title of the browser window
URL condition on the url of the web page
TID condition on the thread id of the Internet Explorer window
PID condition on the process id of the Internet Explorer instance
APP the name of the application hosting the Internet Explorer web control
The method returns a web automation Browser object that matches the search condition arguments and gets programmatic control over the IWebBrowser2 underlying IE native object.
If no browser verifies the search conditions, then null is returned.
In case of an error the method throws a web 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.
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).
This IE automation method works for all Internet Explorer versions: IE6, IE7, IE8, IE9 and with IE protected mode on Windows XP, Vista and Win7.
var coreObj = new ActiveXObject("Twebst.Core");
var browser = coreObj.FindBrowser("URL=http://www.codecentrix.com/");
// If the browser is found, bring the brower window in foreground.
if (browser != null)
- Core | Browser | FindAllBrowsers | foregroundBrowser | searchTimeout | useRegExp
2014 CodeCentrix Software. All rights reserved.