This is a collection of tips and tricks on how to automate web page dialogs (WPD). These dialogs are IE only. Technically they are created by either a ShowModalDialog or showmodelessDialog command. They are not tabbed web pages and Internet Explorer (and the iMacros Browser) can not open them inside a tab. But iMacros has several methods to automate and test such dialogs.
Advantage: This method works well for simple dialogs.
Disadvantage: Tabbing from line to line is complicated and error-prone on complex screens.
DirectScreen can be used to automate all modeless dialog Windows.
Advantage: Very powerful, supports even drag&drop, mouseover and Image Recognition on the dialog.
Disadvantage: Does not work on modal dialogs (recording works, but replay fails because the dialog stops the application. This is not a bug in iMacros, IE behaves the same way).
Advantage: This method is very powerful and highly recommended. It allows you to play a specific macro on a web page dialog.
Disadvantage: Recording the commands for the web page dialog is a bit more complicated. Variables set with iimSet are not substituted in the specified macro.
You first use this method to extract the entire HTML of the webpage dialog, save it to a file, then load the local file in the browser and use it to record the commands.
Then you would load MyWebPageDialog.htm into the browser, record the commands, and save the macro file as something like HandleWebPageDialog.iim. Note: You would also need to remove the recorded URL GOTO command.
A drawback to this approach is that you cannot pass variable values into the specified macro from the scripting interface using iimSet. However, you can overcome this by using custom script/programming code to dynamically generate and write the macro to disk with all the variable values already substituted.
a. Get the URL of the dialog window. If you open the dialog window inside Internet Explorer (not the iMacros Browser) the dialog has an address field. Get the URL pf the dialog window from there.
b. Now use the iMacros Browser. Open a new tab and paste the URL from step (a). Often, the dialog window opens now inside a tab. You can now use the normal recording features (TAG,...) to automate the dialog!
Web Page dialogs were "invented" by Microsoft and only work in Internet Explorer (and the IE compatible iMacros Browser). So often the website will simply not work in Firefox. But sometimes a website displays a normal website instead of a web page dialog when used with Firefox. In this case it can be automated with iMacros for Firefox. Or you can change the iMacros Browser user agent to identify itself as a Firefox browser.
This page was last modified on 14 August 2013, at 15:40.
This page has been accessed 60,430 times.