Your e-Business Quality Partner eValid™ -- Automated Web Quality Solution
Browser-Based, Client-Side, Functional Testing & Validation,
Load & Performance Tuning, Page Timing, Website Analysis,
and Rich Internet Application Monitoring.

eValid -- Testing Microsoft Dynamics -- Modal Dialog Processing
eValid Home

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:

  1. Use the eValid eVclick.exe utility as a separate process to issue a click to suppress (dismiss) the Modal Window from "behind" the activity in the foreground.

  2. In this approach a recording is made, using the eValid Dashboard to change to a different recording mode after the modal popup appears, in Record Windows Desktop mode (Ctrl+F12). The modal window is recorded as a desktop window and eValid records a WindowClose command to suppress (dismiss) the Modal Window.

Example Explanation

  1. eVclick Click-Behind Method

    # 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

            Click here for the MD1eVclick.evs script.

    There are six steps (and six screenshots) that correspond to the script above.

    1. This is the opening window (after the setup and login process for the Microsoft Dynamics account).

      Your e-Business Quality Partner

    2. The script clicks on the "Imports" line to go to the next screen, where there is a DOM-based synchronization step that waits for "Loading" to go away (this is a negative synchronization step using a SyncNotOnElementProperty command).

      Your e-Business Quality Partner

    3. After that synchronization is done, there is a followup simple SyncOnText pivoting on the term "Completed".

      Your e-Business Quality Partner

    4. Now we launch the eVclick.exe utility with a 5000 msec (5 sec) delay before clicking at a specific x/y location on the modal dialog. The black window is the Windows command prompt that shows momentarily when the SystemCall command has been executed. (Command is shown in bold in the script above.)

      Your e-Business Quality Partner

    5. The modal dialog now is present and visible, and after the 5 sec delay the eVclick command clicks the lower right corner box, which suppresses (dismisses) the Modal Dialog.

      Your e-Business Quality Partner

    6. Finally, we see the Yellow Screen "good" response from the eValid playback.

      Your e-Business Quality Partner

    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.

  2. 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.

    1. Here is the setup for pre-recording: Navigate eValid browser to your starting application page.

      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.

      Your e-Business Quality Partner

    2. This starts "...Loading..." the requested Workplace item for Imports and shows the "Loading" icon on the screen.

      Your e-Business Quality Partner

    3. 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.

      Your e-Business Quality Partner

    4. Alternatively, we will hit F11 to enable an alternate recording mode that captures Absolute MouseClicks and click again on the "Import from Files" link. eValid begins with the window position on the desktop recorded.

      Clicking the actual link will record the Absolute left mouse click at a specific location relative to its browser position.

      Your e-Business Quality Partner

    5. Assuming that you already have eValid's Window --> Dashboard tool showing on the desktop, proceed by clicking on the "Record Desktop Window" icon. (The resulting command sequence is shown in bold in the script above.)

      Your e-Business Quality Partner

    6. This triggers a selection window with all of the currect active desktop windows found/available, so highlight "Import Data Wizard" which generates an equivalent recorded DWindowSet command. (The resulting command sequence is shown in bold in the script above.)

      Your e-Business Quality Partner

    7. 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.)

      Your e-Business Quality Partner

    8. All done, the playback shows a Yellow Screen.

      Your e-Business Quality Partner

    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.