Overview:
Salesforce Recorder is mainly designed to record the Test Step(s) for Test Case(s) or Function Library of the Salesforce Applications. It is mainly implemented in Opkey Web for the purpose of automating the Salesforce application.
Objects Recorded through normal mode are 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.
A Quick Screencast
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, the need arises for 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.
Flowchart of Salesforce Recorder
Working with Salesforce Recorder in Opkey:



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.

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 open. The first mode is the Record mode in which you have 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 the 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 Alt key and hover mouse over the desired object. Properties of the spied object get fetched and displayed in the 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 the 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 the Smart Recorder radio button in Step 2 to proceed recording via Opkey Smart Recorder.
The Salesforce application will open. Perform the desired actions. All the actions will get recorded.

Getting Familiar with the Icons of the Salesforce Recorder Window –


Steps to use the Spy Mode of Recorder
Spy is an advanced feature of recorder which enables you to spy the 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 Alt 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 click the 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

Executing the Recorded Test Steps





