ONWEBPAGEDIALOG

From iMacros

Jump to: navigation, search

Web page dialogs are similar to Javascript dialogs except they display HTML content. Since web page dialogs can contain any number of buttons or boxes you can automate them by sending a specific list of keyboard commands to them. Web page dialogs are not normal HTML browser windows. Therefore they do not open in a separate tab, but pop up in front of the current window. The ONWEBPAGEDIALOG command must appear (in most cases) before the TAG command that triggers the popup. During replay "ONWEBPAGEDIALOG KEYS={WAIT<SP>2}{CLOSE}" is active by default to close unwanted ad dialogs.

Contents

Syntax

ONWEBPAGEDIALOG KEYS=some_keys 

Parameters

  • KEYS
    The series of key strokes to send to the dialog. Please use <SP> to replace whitespaces and
    for line breaks. In addition to the alphanumeric keys (a-z, A-Z, 0-9 and so on) the following special keys and commands are supported (the curly brackets are mandatory):
    • {TAB}
      Enter a tabulator.
    • {ENTER}
      Hit Enter key.
    • {CLOSE}
      Close the dialog
    • {WAIT<SP>Seconds}
      Wait for Seconds seconds before proceeding with the next key stroke.
    • {CLICK<SP>11<SP>22} (V6.10 and later)
      Click on the specified x/y coordinate. You can use the DirectScreen recording to determine the coordinates. You can also use DirectScreen directly with modeless web page dialogs, but the replay of commands fails with modal web page dialogs. In this case you need to use the ONWEBPAGEDIALOG command with the click-command.

Examples

Related example macro: Demo-OnWebPageDialog

If you want to close all upcoming dialogs immediately then use

ONWEBPAGEDIALOG KEYS={CLOSE} 

Suppose a dialog comes up that asks you to enter your name and country, then use

ONWEBPAGEDIALOG KEYS=Frank<SP>Miller
USA{ENTER}

See Also

How to automate web page dialogs?, ONCERTIFICATEDIALOG, ONDIALOG, ONDOWNLOAD, ONERRORDIALOG, ONLOGIN, ONSECURITYDIALOG