1. Home
  2. OpKey Help
  3. 13. Salesforce Test Accelerator
  4. 13.2 Salesforce Recorder

13.2 Salesforce Recorder

Overview:

Salesforce Recorder is mainly designed to record the Test Step(s) for Test Case(s) or Function Library of the Salesforce Applications. Once you have recorded a Test Script, it can be ”called and used” multiple times in a Business Component and further in Business Processes for Salesforce Test Accelerator.It is mainly implemented in OpKey Web for the purpose of automating the Salesforce application.

Objects Recorded through normal mode is very different from Objects recorded through Salesforce Recording mode in OpKey as it fetches four exceptional properties label place holder, label X path id relative, label text, label X path position in order to handle the dynamic nature of objects existing in the Salesforce application.

Need of Salesforce Recorder

Salesforce Application is one of the popular CRM having extraordinary features that allows its Objects to change their properties at runtime. Since there exists dynamic Objects in the Salesforce application, hence it becomes difficult to automate it.

If Recording is performed in the normal mode for the Salesforce Application then the OpKey web recorder is unable to search objects when the Test step(s) are being executed. This happens because the Id of Objects have dynamic behaviour and changes during runtime.

Here, arises the need of Salesforce recorder.

Although, there are few static objects existing in the Salesforce application like labels.

Thus, when recording is performed through Salesforce recorder, it fetches four exceptional properties [with respect to the static Objects] and handles the dynamic behavior of Salesforce object internally.

Working with Salesforce Recorder in OpKey: 

  • Navigate to the Project workspace section and create a new test case file.

  • Go to the toolbar section and click on ‘Record’ icon which provides six options: Web Recorder, Mobile Recorder, Oracle RecorderDesktop Recorder, Salesforce Recorder and Workday Recorder.
  • Select Salesforce Recorder to perform recording on a Salesforce application.

  • The Salesforce recorder window will get opened.

Step 1: Select Object Repository

The Step 1 of the Salesforce recorder window asks the User to select Object Repository. This step has two radio buttons with the following  options :

Default Object Repository

This radio button is selected, by default. Object Repository will be automatically created in the selected folder.

Choose Object Repository

Once this radio button is selected, the Object Repository tree will get automatically enabled.

Getting Familiar with the icons of the ‘choose Object Repository” option

Expand the tree unless you reach the smallest unit, from where no further expansion is possible.

Select the Object Repository.

You can search for a Specific Folder or Object Repository file by typing its name in the Search box.

Step 2: Select Your Browser

The Step 2  of the Salesforce recorder window asks the User to select the browser. This step has two radio buttons with the following  options :

Chrome Add On

This radio button is selected, by default along with the browser chrome.

It is to be noted that the Add Extension Button will only appear in case the Chrome Add On is not added to the Browser.Click on Add Extension. The Following pop up window will get open

Click on Add Extension. You will see the screen as:

The OpKey Recorder extension will get added to the Chrome Browser on your system.

Now, Start Recording Button will appear on the screen:

Smart Recorder

Once this radio button is selected, the .Jnlp file starts getting downloaded on your machine.

If the OpKey Smart Recorder is not installed on your system then install it. Otherwise, Click Discard and Open the OpKey Smart Recorder.

The Options to select other browsers will get enabled. You may select any browser of your choice and start Recording.

Getting Started with Recording 

Based on the Choice for Step 2 – you can start recording the flow by either of the following:

Click on Start Recording.

Start Recording via Chrome Add On

**It is mandatory that the Chrome Add On  radio button is Selected in Step 2 to proceed recording via chrome Add On.

  • The OpKey AddOn window will get open along with another window to display the Flow of Live Recording.

Flowchart showing the Working of Salesforce Recorder via. Chrome Add On


Getting Familiar with the Icons of the OpKey Add On Window-

Click on Open Chrome Window icon and Open the Salesforce application over the browser.

The Salesforce application will get open. The first mode is the Record mode in which you to perform and record all the actions on a  Salesforce application.

Perform the desired actions. All the actions will get recorded.

Using Spy Mode of Recorder

Spy is an advanced feature of recorder which enables you to spy desired object and fetch its properties. This feature is very useful in case you have forgotten to fetch an object while performing recording.
While fetching objects in Spy mode, keep holding Ctrl key and hover mouse over the desired object. Properties of spied object get fetched and displayed in bottom pane of the recorder window.In the above given images, you can view the spied object along with image & properties. Now, the fetched object can be added directly to the step or to OR. If you want to add it to the step then click on Add Step icon by choosing action from the drop down list. When you use Add Step icon then this fetched object will be added within the current recording session only. Also Read: Concept of setting Pivot for an Object 

You can also view the flow of live recording here.

Click on Stop & save icon. A pop up window will get open as follows:

Click Yes to save all recorded Steps.

Start Recording via OpKey Smart Recorder

**It is mandatory to select Smart Recorder radio button in Step 2 to proceed recording via OpKey Smart Recorder.

  • The Recording window will get open along with the selected browser Open the Salesforce application over the browser.

Flowchart showing the Working of Salesforce Recorder via. OpKey Smart Recorder

The Salesforce application will get opened. Perform the desired actions. All the actions will get recorded.

Getting Familiar with the Icons of the Salesforce Recorder Window –

 

  • The Salesforce recorder will fetch four exceptional properties label place holder, label X path id relative, label text, label X path position to handle the dynamic objects of the Salesforce application, unlike the normal recording mode.
  • *These four properties are fetched only if the Objects existing in the Salesforce Application are dynamic in nature.
  • Unlike other tools, Opkey does not require any Static waits to be added in the scripts.
  • All types of dynamic loading of the objects are handled internally in OpKey.

Using Spy Mode of Recorder

Spy is an advanced feature of recorder which enables you to spy desired object and fetch its properties. This feature is very useful in case you have forgotten to fetch an object while performing recording.
While fetching objects in Spy mode, keep holding Ctrl key and hover mouse over the desired object. Properties of spied object get fetched and displayed in bottom pane of the recorder window.

In the above given images, you can view the spied object along with image & properties. Now, the fetched object can be added directly to the step or to OR.

If you want to add it to the step then click on Add Step button by choosing action from the drop down list. When you use Add Step button then this fetched object will be added within the current recording session only.

Another way to use the fetched object is Add to OR. By using this button, you can directly add this fetched object to the corresponding OR which can be used as per your need, not only within this session but also with other sessions as well.

Also Read: Concept of setting Pivot for an Object 

  • Click on Stop & save icon.
  • All the Test Steps will get saved.

Executing the Recorded Test Steps

  • Click on Run now.
  • The execution wizard window will get opened. Select an Online agent and set the Generic plugin as Salesforce.
  • Click on Finish.

  • The Execution will begin. All the Test Steps will get executed one by one and the Execution logs will be generated.
  • You can also view the Execution Results by clicking on the icon highlighted in the above screenshot.
  • The Execution Result shows that all the Test cases have been passed successfully.
  • Click on Export Report icon.
  • Export the Summary /Detailed Type Report.

  •  Click on the downloaded report to view it.
  • Congratulations! You have successfully automated a Test Case of a Salesforce Application through OpKey Salesforce recorder.
Was this article helpful to you? Yes No