|
Summary
The scripts below illustrate two approaches to handling a modal popup that
occurs within the Microsoft Dynamics application.
These examples are sample script passages from our test environment,
which requires login and setup to arrive at the starting page.
The two examples
and login account provide a basis from
which to illustrate the different recording/playback protocols
that can be used for this application.
General Approach
The two approaches are:
Example Explanation
# Recording by eValid V9 # Recording made on: Microsoft Windows XP (IE 9.0.8112.16421) ProjectID "Project" GroupID "work" TestID "MD1eVclick" LogID "AUTO" ScreenSize 1280 1024 FontSize 0 DeleteCache DeleteCookies # This command commented out; starting up on the logged in application... # InitLink "about:blank" Wait 3375 FollowLink 0 235 "Imports" "https://softwareresearchinc0.crm.dynamics.co" \ "m/main.aspx?skipnotification=true&updatetimezone=true#" "" Wait 6804 # # Insert-Recording started ... SyncNotOnElementProperty 0 "id" "loading" "" SyncOnText 0 "Completed" "number:0" # # Insert-Recording stopped ... # This command sets the click to happen 5 seconds later... SystemCall "eVclick 5000 711 775" ResetTimer FollowLink 0 72 "Import from Files" "https://help.crm.dynamics.com/HELP/" \ "5.0.9688.1531/1033/LIVE/HELPVISOR/#" "number:0>>number:0" NO_NAV ElapsedTime "Import from Files" # End of recording |
There are six steps (and six screenshots) that correspond to the script above.
Note: The coordinates for the "eVclick 5000 711 775" command in the script were obtained by running a second eValid, in parallel with the one from which the recording was made, and using both the Desktop Window and Application Mode recording modes to record the location of the button on the lower right of the Modal Dialog window.
WindowClose Method
# Recording by eValid V9 # Recording made on: Microsoft Windows XP (IE 9.0.8112.16421), HostName "barbados-PC" # ProjectID "Project" GroupID "work" TestID "MD1WindowClose" LogID "AUTO" ScreenSize 1280 1024 FontSize 0 DeleteCache DeleteCookies # This command commented out; starting up on the logged in application... # InitLink "about:blank" Wait 3375 FollowLink 0 235 "Imports" "https://softwareresearchinc0.crm.dynamics.co" \ "m/main.aspx?skipnotification=true&updatetimezone=true#" "" Wait 6804 # # Insert-Recording started at: <2012/06/19 12:27:44> # DOM synchronization commands to assure next page is present... SyncNotOnElementProperty 0 "id" "loading" "" SyncOnText 0 "Completed" "number:0" # FollowLink 0 72 "Import from Files" "https://help.crm.dynamics.com/HELP/" \ # "5.0.9688.1531/1033/LIVE/HELPVISOR/#" "number:0>>number:0" NO_NAV # # Insert-Recording started ... Wait 4140 WindowPos 0 0 0 926 933 clLClick 0 392 251 0 # # Insert-Recording stopped ... # Wait 9038 ResetTimer DWindowSet 1 "Import Data Wizard -- Webpage Dialog" 163 163 608 653 ElapsedTime "Import Data Wizard" Wait 3253 WindowClose 1 # End of recording |
MD1WindowClose.evs script.
Here is an expansive explanation of how this script was created.
Make sure the Dashboard is enabled before starting recording. The Dashboard will give you access to the alternate advanced recording modes even when the browser is locked out due to the appearance of the modal window.
Start Recording... InitLink ... recorded but will comment out during playback.
Clicked on "Imports" section under My Work on the left.
This starts "...Loading..." the requested Workplace item for Imports and shows the "Loading" icon on the screen.
In the middle frame a selection of Samples appear under My Imports. We needed to manually insert some Synchronization scripted command(s), so the eValid browser will wait before clicking on the next action... Made mental notes during recording and only added syncs after stopping recording and prior to playback.
Clicking the actual link will record the Absolute left mouse click at a specific location relative to its browser position.
Finally, Click on the "X" to Close the modal window. eValid records the closing of the window. (The resulting command sequence is shown in bold in the script above.)
All done, the playback shows a Yellow Screen.
Technical Notes
The "popup" seen in the screens above is actually a windows "browser" that is launched
in modal status by a JavaScript call done within the starting page that you see.
Because of the way the JavaScript is written, this window is not a sub-window of eValid. Because it is not linked to the parent eValid copy, actions taken on the sub-window (the "modal" one) are not sent to eValid.
In the "B" solution to closing the modal dialog given above, eValid was put into Record Desktop Window mode (Ctrl+F12), using the Dashboard (which was launched from eValid before the recording process began). The DashBoard, during a recording session, has the capability of switching between all of the different recording modes -- and because it is implemented as a standard non-modal dialog box.
In case more activity is needed in the modal dialog box, the script can include the full range of the Record Desktop Window recording capability, including keyboard and mouse activity, absolute mouse clicks, image synchronization, etc.
Also, if you are running this script in monitoring mode, please be aware of Focus Issues in Background Operation.