Presentation is loading. Please wait.

Presentation is loading. Please wait.

Session Objectives Object Types – Query, HTML Table Purpose of the Query and Explanation How to add a Query to a PTF Test Case 2 Session 5 - Query.

Similar presentations


Presentation on theme: "Session Objectives Object Types – Query, HTML Table Purpose of the Query and Explanation How to add a Query to a PTF Test Case 2 Session 5 - Query."— Presentation transcript:

1 Session Objectives Object Types – Query, HTML Table Purpose of the Query and Explanation How to add a Query to a PTF Test Case 2 Session 5 - Query

2 Purpose of Query in PTF Query is one of the few ways of obtaining data from records, and providing inputs in PTF. Query needs to be created in advanced, and stored in PeopleSoft. PTF allows us to run preexisting query through Query Viewer. After a query is run in PTF, the output is opened in HTML format, and required data is picked up using a combination of PTF functions. Session 5 - QuerySlide 3

3 Recording a Query in PTF Navigate to Query Viewer page Enter the query name and click on search Click on the HTML link in the search results and stop recording Output opens up in a new browser in a grid format Drag the hand icon in the status bar (yellow colored) over the required cell Make a note of I/R/C value, which is now visible in the status bar Point to Note: I/R/C stands for Index/Row/Column which refers to particular cell coordinates in a grid. Ex: 5/2/2 refers to Index=5, 2nd row and 2nd column Session 5 - QuerySlide 4

4 Steps to Run a Query – PTF Editor In order to retrieve data from the query, the following steps needs to be added to the test editor manually. Browser/Wait for New ( Wait time in seconds is provided) – To open up a new browser Browser/Frameset – To set the cursor to a specific field HTML Table/Cell Get Value : index=I/R/C, ret=&var. (This cell value into the variable) Browser/Close – To close the current browser window Browser/Frameset – To pass control back to the initial browser window Session 5 - QuerySlide 5

5 Step1 : Record Query in PTF - How to Pick the output data Open a PTF Message Box – From Menu, Tools - > Message. It opens the Message Box Create a New Test & Start Recording Go to Query Viewer and Select a Required Query(Give the Full Query name). Don’t use partial Query name In order to run a query in PTF, the query output needs to be opened up in HTML format. Stop Recording A new browser page opens with the output in the grid format. Drag the hand icon available on top of the cell whose value needs to be picked up. Pick the I/R/C value and assign to a variable. I/R/C value of the cell in the yellow bar, as shown above. Close the HTML Output Session 5 - QuerySlide 6

6 Step1 : Record Query in PTF - How to Pick the Output Data Click on the Initial Browser window (Control on the Browser) Go to PTF Test Editor & Keep the Cursor after Link.Click of Query Run I/R/C Value Hand Icon Session 5 - QuerySlide 7

7 Step 2 : Add Query Steps to Test Script Enter Browser.WaitforNew Enter Browser.FrameSet as given below Query Name Query Run ButtonQuery Navigation Waiting for Query to Complete Session 5 - QuerySlide 8

8 How to Assign a Variable A variable is used to store and apply the values. A variable name starts with an ‘&’. In the test editor, add a row with Object Type | Action - HTML Table/ CellGetValue. In the recognition column, enter index= I/R/C; (value of the cell picked up before). This is followed by ret= &var; (to retrieve the value of the cell in this assigned variable). Session 5 - QuerySlide 9

9 Step 3: Add Steps to Select Value From Query Result Object Type – HTML Table HTML Table – Object Type CelGetValue – Action - Returns the contents of a HTMLTableCell ( Retrieve data from the Query Results) Variable HTML Table CellGetValue Session 5 - QuerySlide 10

10 Step 4: Assign Variable to Test Script Identify the field where the variable needs to be placed. Use Object Type |Action Type – Text|Set_Value to assign the value. In the value column, place the &var. This will populate the stored value while running the The variable name is placed. online test. Value of variable is placed. Session 5 - QuerySlide 11

11 Online Page Navigate to Query Viewer page. Query name is entered in search. Run to HTML is clicked. Session 5 - QuerySlide 12

12 Query Output Opens up in new browser The current cell refers to 5/2/2, and hence this emplid will be picked up. The status bar shows the I/R/C value of the cell currently selected. Session 5 - QuerySlide 13

13 PTF Test Editor - Query Query Name Opens up the new browser window The query output is returned in a variable Session 5 - QuerySlide 14

14 Query in PTF (Data) Variable from Query Session 5 - QuerySlide 15

15 PeopleSoft Search Page Input Data from Query Session 5 - QuerySlide 16

16 Log - Query Session 5 - QuerySlide 17

17 Log for Query Results Session 5 - QuerySlide 18

18 Business Usage Query can be used in following scenarios: To make any test case/process dynamic Ex.: For any job data changes on any hourly employee, a random emplid can be picked up using a query to pick. To pick up data from one table to be put in another table Ex.: Query job code table to pick up a job code, to be put in job data page. Session 5 - QuerySlide 19

19 Training Hand out the Training Material To be completed in 30 minutes Discussion Walk through the Log Explaining the log results Highlight the key words and lesson learned Session 5 - QuerySlide 20

20 Q & A and Comments Session 5 - QuerySlide 21


Download ppt "Session Objectives Object Types – Query, HTML Table Purpose of the Query and Explanation How to add a Query to a PTF Test Case 2 Session 5 - Query."

Similar presentations


Ads by Google