FindModelessHtmlDialog - web automation method

Connects a Frame IE automation object to a modeless dialog box that displays a HTML document (see showModelessDialog).

Applies to:
Browser
  var modelessFrame = browser.FindModelessHtmlDialog(Search conditions);
Arguments:
This method accepts a variable number of Search Condition arguments. If no search condition is provided, then the first modeless frame is returned. Any HTML frame or iframe attribute is accepted in search conditions.
Remarks:
The method returns a Frame IE macro object corresponding to a HTML modeless dialog box created by showModelessDialog method. If no modeless HTML dialog box is found, then null is returned. Internet Explorer pop-up blocker may block HTML dialogs. In case of an error the method throws a script exception and the lastError property of the core object is set as follows:
The time allocated for search is specified by the searchTimeout property. If loadTimeout is not zero, then the method waits the browser objects 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 IE macro exception is thrown.
Example:
var coreObj = new ActiveXObject("OpenTwebst.Core");
var browser = coreObj.StartBrowser("http://www.codecentrix.com/tests/htmdlg.htm");
var openBtn = browser.FindElement("input button", "text=Open Modeless Box");

// Click the button that opens the modeless dialog.

openBtn.Click();

var modelessFrame = browser.FindModelessHtmlDialog();

WScript.Sleep(2000);

// Click the button that closes the modeless dialog.
var closeBtn = modelessFrame.FindElement("input button", "");
closeBtn.Click();
		
See also:
Browser | Frame | FindChildFrame | FindFrame | FindModalHtmlDialog | searchTimeout

© 2017 CodeCentrix Software. All rights reserved.