Interrogating Windows and web applications
Archived
5 Tareas
30 minutos
Escenario
Now that the solution contains both projects and associated application adapters, interrogation is the next step. After reading the project documentation, the process calls for logging in to the CRM, displaying the customer information on a user interface as well as a menu item for a future process. For the ACME Search System, the project documentation states to log into the application and access the Stores link to search for the nearest store based on the customer's ZIP code. The project documentation requires that the control names start with the application acronym and also requires that the ACME Search System login needs at least four characters for both the user name and password fields. A hidden control on the sign-in page requires interrogation.
Your assignment
Interrogate the login controls, toolbar buttons, customer account information, and menu items in the CRM application using the three methods: Interrogation target, Create Control, and Add Menu Items. Rename the objects in the Properties window during the interrogation process.
In this part of the solution, complete the following:
- Interrogate the Windows application and the controls required for login, menu buttons, and customer information
- Rename the Windows application controls
- Interrogate the web application and the controls required for login, menu links, search criteria, and search results
- Rename the web application controls
Tareas detalladas
1 Interrogate a Windows application
- In the Solution Explorer under the CRMPrj, double-click the CRM.os project item to open the adapter in the Designer Window.
- On the CRM.os tab, click Start Interrogation to launch the CRM application as specified in the Path property and open an Interrogation Form dialog.
- On the Interrogation Form, drag and drop the Target icon on to the Login button.
- On the Login screen with the Login button highlighted, release the pointer to update the Object Hierarchy update with the button control.
- On the Interrogation Form, drag and drop the Target icon to interrogate the User Name and Password fields and update the Object Hierarchy with the new controls.
- On the Object Hierarchy and Properties window, highlight each object in the hierarchy and rename the design (Name) property as follows:
Object Name
Design (Name)
Login
CRMfrmLogin
btnbtnLogin
CRMbtnLogin
txttxtCredentials
CRMtxtUserName
txttxtPassword
CRMtxtPassword
-
With the interrogation still running, on the CRM application, click Login button to display the CRM window.
- On the Interrogation Form, drag and drop the Target icon to interrogate the New Call, User 1, User 2, and User 3 buttons and to update Object Hierarchy with the new controls.
- On the Object Hierarchy and Properties window, highlight each object in the hierarchy and rename the design (Name) property as follows:
Object Name
Design (Name)
CRM_Subtraction_OpenSpan
CRMfrmMain
Toolbar1
CRMToolBar
btnbntUser1
CRMbtnUser1
btnbntUser2
CRMbtnUser2
btnbtnNewCall
CRMbtnNewCall
btnbtnUser3
CRMbtnUser3
-
On the CRM tool bar, click New Call to display the New Call 1 window.
Nota: Your display settings may black out the Account Number field. Change the display to Windows Classic, if desired. - On the Interrogation Form, drag and drop the Target icon to interrogate the following targets:
- Account Number
- Name
- Street Address
- City
- State
- ZIP
- On the Object Hierarchy and Properties window, highlight each object in the hierarchy and rename the design (Name) property as follows:
Object Name
Design (Name)
MdiClient
CRMMDIClient
CRMchild
CRMChild
pnlCustomerInfo
CRMpnlCustInfo
lbllblAcctNum
CRMlblAcctNum
txttxtCity
CRMtxtCity
txttxtName
CRMtxtName
txttxtState
CRMtxtState
txttxtStreetAdd
CRMtxtStreetAdd
txttxtZip
CRMtxtZip
2 Interrogate a Windows application using Add Menu Items
- With interrogation still running, in Object Explorer, right-click the CRMfrmMain object and select Add Menu Items to display the Add Menu Item window.
- On the Add Menu Items window, select the Orders Console check box.
- On the Add Menu Items window, click the X to close the dialog and save your selection.
- On the CRM.os tab, in the design area, click Stop Interrogation to close the CRM application and the Interrogation Form window.
- On the menu bar, click File > Save All to save the interrogation.
3 Interrogate a web application
- In the Solution Explorer, double-click ACMESystem.os to open the adapter in a design tab.
- On the ACMESystem.os tab, click Start Interrogation to open the Interrogation Form and browser.
- With the Interrogation Form dialog option set as Default and the Create Global Web Page check box selected, drag and drop the Target icon to interrogate the User Name, Password, and Sign In targets.
- On the Object Hierarchy and Properties windows, highlight each object in the hierarchy and rename the design (Name) property as follows:
Object Name Design (Name) Sign_In_Pega_Training_Web_Appl ACMEwpSignIn Please_enter_a_user_name_of_at_least ACMEfrmCredentials Login_button ACMEbtnSignIn textBox1 (user_password) ACMEtxtPassword User_name ACMEtxtUserName - On the Login page, in the User Name and Password fields on the Login page, enter 1234 to enable the Sign In button.
- On the Login page, click Sign In to open the Home Page of the website.
- On the Interrogation Form, drag and drop the Target icon over the Stores link to update the Object Hierarchy with the controls.
Nota: Make sure the smallest highlight box displays for the correct target.
- On the Home page, click Stores to open the Stores search page of the website.
- On the Interrogation Form, drag and drop the Target icon over the Zip Code field and Find Store button to update the Object Hierarchy with the controls.
- On the Object Hierarchy and Properties window, highlight each object in the hierarchy and rename the design (Name) property as follows:
Object Name Design (Name) Home_Pega_Training_Web_Applica ACMEwpHome Stores ACMElnkStores Stores_Pega_Studio_Training_Web_Ap ACMEwpStores Search_by_ZIP_CodeSubtrationORSubt ACMEfrmSearch Find_Store ACMEbtnFindStore txtZip ACMEtxtZip - On the Search page, in the Zip Code field, enter 30022.
- On the Search page, click Find Store to display the Results page.
4 Interrogate using Select Element
Nota: On the Select Element window, when you select an element tag, the application highlights the control to ensure that you select and create the correct control during the interrogation process.
- In the Interrogation Form, select Select Element from the combo box.
- On the Interrogation Form, drag and drop the Target icon over the store address to display the Select Element window.
- On the Select Element window, select <TABLE> and click Create Control. The object collects all table rows as one unit to use for the address instead of each individual address item.
- On the Object Hierarchy and Properties windows, highlight each object in the hierarchy and rename the design (Name) property as follows:
Object Name Design (Name) Store_Locator_Pega_Studio_Training_We ACMEwpResults Peachtree_City2715_Hwy_54_WPeachtr1 ACMEfrmStoreAdd Peactree_City2715_HWY_54_WPeachtre ACMEtblNearestStore - On the ACMESystem.os tab, click Stop Interrogation to close the browser window and Interrogation Form window.
- From the menu bar, click File > Save All to save the changes. When complete, the Object Hierarchy should look like the following image:
5 Interrogate using Web Controls
- On the ACMESystem.os tab, click Start Interrogation to open the Interrogation Form and browser.
- On the ACMESystem.os tab, click the Web Controls tab.
- In the Web Controls frame, click List Browsers and Frames to list all open browser windows in the Results box.
- From the list in the Results box, click Sign In.
- In the Filter drop-down, select INPUT type = 'Hidden'.
- In the Web Controls frame, click List Web Controls to display a text box control.
- In the Results box of the List Web Controls, right-click INPUT type='Hidden' and select Create Control to display the control in the Object Hierarchy as pegasystem_version.
- In the Object Hierarchy, click pegasystem_version.
- In the Properties window, rename design (Name) property to ACMElblVersion.
- On the ACMESytstem.os tab, click Stop Interrogation to close the browser window and Interrogation Form window.
- From the menu bar, click File > Save All to save your edits.