Record Salesforce Test Cases

Users can record test cases in the Classic as well as the Lightning mode of Salesforce and customize the test script using the generated locators. Users can record and execute test cases only for the Web.

Note: To record test cases for the Salesforce project (created in QAS), users should have a valid SFDC App license for SFDC Recording.

 

Example:

Here, we are recording a sample test case to add a new Lead record in Salesforce.

1. Open the Record menu and select Web.

The Record Web screen opens.

2. Mention the Web URL for salesforce and Start recording the test case.

3. Log in to the Salesforce website.

 

4. Click on the App Launcher menu and search for the Leads module.

5. Open the Leads module once you locate it.

You are navigated to the Leads module of Salesforce.

6. Click on the New tab to add a new lead record in Salesforce.

7. Enter required details and Save the record.

You can see the new Lead details in added Salesforce.

Now stop recording the test case.

In QAS, the recorded test steps are displayed like below.

 

Use Salesforce Locators in Test Cases

You can use the generated loc file for the module through https://qmetrysupport.atlassian.net/wiki/spaces/QAShelp/pages/2947547304 and take the reference of locators to customize the recorded test case.

For example, referring to the locators of Lead.loc file, the “title” key is entered in the Element column and its value in the Input column in the recorded test case.

 

You can also add elements to the locator repository. Refer to https://qmetrysupport.atlassian.net/wiki/spaces/QAShelp/pages/915406859 to know how to add the elements to the repository.