Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 

The following approach is not specific to single test automation tools but applies for most tools in the market like CBTA, eCATT and HP QTP/ HP UFT.

Typical situation when working with dynamic screens

Some transactions like ME51N Create Purchase Requisition remember the state from the last usage of the transaction in the user context. So the start screen in the transaction can have collapsed screen elements

or the screen elements could be expanded

Challenge 1:

You perform a recording for an automated test while all required screen elements are already expanded. When you execute the test script later it might fail because some of the required screen elements can't be processed as they are not visible. This could happen if same user left the transaction during the last usage in a different state or you are executing the script with a different user or even in a different system.

Challenge 2:

You perform the recording when the required screen element is initially not visible so you record the click on the button that expands it. When you replay the script most likely fails because the initial screen state is now expanded and the related button was replaced by the collapse button (e.g. ME51N).

Recommended Approach:

Before recording:

  1. Check which screen elements are required and get a clear picture of the initial screen state that is required to perform the actual test activities.
  2. Check for shortcuts to prepare the screen to always get to the right state (e.g. to expand the required screen elements). Most times you'll find the shortcuts with mouse over text for the button (with ME51N) or context menu of right mouse click (ME21N)

During recording:

Shortcuts (e.g. Crtl+F2 and Crtl+F3) should be processed although the necessary screen elements are already expanded to ensure these actions are part of the script.

Result:

The recorded script will always ensure that the screen is prepared to meet the expected state and then is able to perform the actual test activities independent from last usage or user context.

9 Comments