UI With Row

Introduction

This API is used to locate rows within a table. Once the table is located through a With Row, other sub-steps can be added underneath to perform operations on the table fields (e.g. a UI Action or a UI Assert).

Use the following links to navigate to the relevant section:

Usage

UI With Row always occurs as a sub-step under a UI On Screen step. Both steps are added automatically when using the Test Builder. This is recommended as the fastest way to add this kind of Test Step, although it is also possible to use drag-and-drop from the API Palette.

With Row Parameters

The screenshot below shows a With Row’s parameters in use:

In this example, the table being located is an Account list view, and the row being located is the 6th row in the table.

The full parameter definitions are as follows:

  • Connection Name: The Connection currently in use
  • Table Type: The type of table (‘Salesforce Table’ or ‘Page Object Row’). This will be ‘Salesforce Table’ for any standard page, such as a list view, or ‘Page Object Row’ for a Visualforce or non-Salesforce page
  • Table: The name of the table. The dropdown will be autopopulated with a list of available tables on the current page (based on the On Screen parent step)
  • Row Locator: The specific row of the table that is to be tested. This could be a Row Number (as in screenshot above) or a WHERE clause where the record is located based on defined criteria (e.g. Account Name = ‘Provar Plc’)

Example 1: Deleting from a list view with Row Number

In this example we will use UI With Row to locate a specific row in the ‘All Accounts’ list view. We will then use a UI Action step to delete the Account.

Step 1: Launch the Test Builder and navigate to the ‘All Accounts’ list view.

Step 2: Right-click on the ‘Del’ inline link of the 6th row (e.g. ‘A01ProvarTest) and select ‘Add To Test Case’:

Step 3: Configure the draft Test Step as follows:

Note that Row Locator is ‘Row Number = 6’ and Interaction Type is set to ‘Click’.

Step 4: Click ‘Add & Do’ to save the Test Step.

Step 5: Navigate to Provar Desktop and review the Test Case:

Note that the On Screen has been added as the parent of With Row, and With Row as the parent of the UI Action. This hierarchy has been generated automatically through the Test Builder.

Step 6: On the UI Action Test Step, set the Action to ‘Click and Confirm’. Then save the Test Case.

Example 2: Asserting in a related list with Row Filter

In this example we will use UI With Row to locate an activity with a specific subject in an Activity History related list. We will then use a UI Assert to check the ‘Assigned To’ field of that activity.

Step 1: Launch the Test Builder and navigate to view page of a specific Account (e.g. ‘Dickenson plc’), then scroll down to the Activity History related list:

Step 2: Right-click on the ‘Assigned To’ value of any row (e.g. ‘vikas wig’) then select ‘Add to Test Case’:

Step 3: Configure the draft Test Step as follows:

Note that Row Locator is ‘Subject = ‘Test Call’ ’, Interaction Type is ‘Read/Assert’ and Expected Value is ‘vikas wig’.

Step 4: Click ‘Add & Do’ to save the Test Step.

Step 5: Navigate to Provar Desktop and review the Test Case:


Note that the On Screen has been added as the parent of With Row, and With Row as the parent of the UI Action. This hierarchy has been generated automatically through the Test Builder.

Note also that Row Locator has been autopopulated with the filter condition of ‘Subject = ‘Test Call’.

Step 6: Save the Test Case.

Further Reading

2017-05-12T11:34:45+00:00

Leave A Comment