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:
  var f = coreObj.AttachToNativeFrame(nativeWindowObject);
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.
// 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);

See also:
Core | Browser | AttachToHWND | AttachToNativeBrowser | AttachToNativeElement | nativeBrowser | nativeFrame | nativeElement

© 2017 CodeCentrix Software. All rights reserved.