When you need to manually edit a test, it can be necessary to generate screen components manually. This document describes this activity for a Web Dynpro ABAP application.
A screen component can be inserted as a step of a test script. Each parameter of a screen component corresponds to an input field, such as dropdown menu, check box, or radio button, in the automated user interface. At execution time, each parameter that is provided with a value is populated with this value in the corresponding user interface.
So it you can reuse screen components in several tests. This makes it easier to repair tests if systems are updated with new service packs or custom developments.
Note
You can only reuse screen components in tests that use the same logical component. This ensures that tested products have the same version. If no logical component is used in the target component of the system data container of the test, the product versions of the system under test are used to assemble compatible screen components.
Creating screen components manually is an advanced function. We recommend that you automatically record test scripts with CBTA recording wizard.
For ABAP Web Dynpro applications, the screen components are generated based on statically defined Web Dynpro views, from the same or a used component.
If a Web Dynpro view is generated dynamically at runtime, you cannot create a screen component. Use a default component instead. For more information, see the separate document on default components under
.You have created a test script with an ABAP Web Dynpro executable object.
The ABAP Web Dynpro executable object includes the name of the application.
To identify the name of the relevant view, in the Web Dynpro application UI, choose Technical Help
in the context menu of a field, and take note of the following:
Web Dynpro component displayed under
View name displayed under Views and View Elements
In the Test Management
work center, under Test Repository
, open the test script or test configuration for editing.
To inspect the relevant view, choose CBTA Inspection
on the Test Script
tab. The Inspection Wizard is started.
Select the view and choose Next
.
The screen component is generated
Choose Finish
.
Add the screen component, and the corresponding parameters, to the script.
Identify the parameter value of the parent context URI (PARENTCONTEXTURI
).
Caution
The PARENTCONTEXTURI
parameter is specific to ABAP Web Dynpros. It is necessary for the usability of the screen component.
Use the Object Spy
function to retrieve the identifier (URI
) of a user interface control. Use it only in applications with stable IDs (parameter sap-wd-stableids
= X
must be set in the URL).
Open the application that you want to test.
Go back to the editor for test scripts. On the Test Script
tab, under Parameters
, choose Get Technical UI Information
.
You go to the Object Spy.
On the Web Application
tab page, select the session that you previously opened.
Choose Spy
.
Position the cursor on a field in the Web Dynpro view. The field is highlighted red.
To display the value of the PARENTCONTEXTURI
parameter, in the Property Name
tree go to .
Enter the value of the PARENTCONTEXTURI
parameter in the parameters of the screen component.