AttachToNativeFrame - web automation method

Connects to an existing IE6/IE7/IE8/IE9 browser instance and creates a web macro Frame object from a native Internet Explorer window object.

Applies to:
Core
  var f = coreObj.AttachToNativeFrame(nativeWindowObject);
Arguments:
Remarks:
Returns a Frame web automation object. The nativeWindowObject parameter is a native Internet Explorer window object ( IHTMLWindow2 ). It could be obtained using other ways than Twebst web automation library features. It could be also obtained by using nativeFrame property. This method is useful if you need to automate a native frame/iframe DOM hierarchy in an existing IE6/IE7/IE8/IE9 browser instance.
Example:
// Start an Internet Explorer object.
// Get the top window native object and attach to it.
// Use the attached library Frame object.
var internetExplorer     = new ActiveXObject("InternetExplorer.Application");
internetExplorer.Visible = true;

var coreObj        = new ActiveXObject("OpenTwebst.Core");
var topWindow      = internetExplorer.Document.parentWindow;
var attachedWindow = coreObj.AttachToNativeFrame(topWindow);

attachedWindow.parentBrowser.Navigate("www.codecentrix.com");
		
See also:
Core | Browser | AttachToHWND | AttachToNativeBrowser | AttachToNativeElement | nativeBrowser | nativeFrame | nativeElement

© 2017 CodeCentrix Software. All rights reserved.