AttachToNativeBrowser - web automation method
Connects to an existing instance of IE6 - IE9 browser and creates a web automation library Browser object from a native Internet Explorer browser object.
Applies to:
- Core
var b = coreObj.AttachToNativeBrowser(nativeBrowserObject);
Arguments:
-
-
nativeBrowserObject
is a native Internet Explorer browser object.
Remarks:
-
Returns a Browser object.
The nativeBrowserObject parameter is a native Internet Explorer browser object ( IWebBrowser2 ).
It could be obtained using other ways than Twebst web automation library features. It could be also obtained by using nativeBrowser property.
This method is useful if you already have a native Internet Explorer browser instance and you want to use it as a web automation Browser object.
Example:
// Start an Internet Explorer object and attach a Browser object to it.
// Navigate using the library Browser object.
var internetExplorer = new ActiveXObject("InternetExplorer.Application");
internetExplorer.Visible = true;
var coreObj = new ActiveXObject("OpenTwebst.Core");
var attachedBrowser = coreObj.AttachToNativeBrowser(internetExplorer);
attachedBrowser.Navigate("www.codecentrix.com");
See also:
- Core | Browser | AttachToHWND | AttachToNativeElement | AttachToNativeFrame | nativeBrowser | nativeFrame | nativeElement
©
2017 CodeCentrix Software. All rights reserved.