6.1 Opkey Web Recorder
Overview:
OpKey Web Recorder is a recorder utility integrated with OpKey. It allows OpKey users to record their actions performed on a web application and create a Test script for the purpose of automating the web application.
Need of Web Recorder
The traditional process of automating the web application involve the mentioned process to be followed:
- Adding the appropriate keyword in the Test Step.
- Fetching the required objects and the mapping it by using the Object Input Arguments (if required)
- Parameterizing the Test Case using Data Input arguments (if required)
This process is very time consuming and requires lots of manual efforts. Here, arises the need of web recorder which can record all the actions performed by you over the web application and create a Test Script for the same.
Flowchart Explaining the Working of OpKey Web Recorder
Working with OpKey Web 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 Recorder, Desktop Recorder, Salesforce Recorder and Workday Recorder.
- Select Web Recorder to perform recording on a web application.
- The web recorder window will get opened.
Step 1: Select Object Repository
The Step 1 of the Web 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 Web 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.
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.
Note: If you are using the Web Recorder on a new machine where Web Recorder is not installed, JNLP file gets downloaded. You need to save the downloaded JNLP file and launch it and further you will be redirected to install it first and then launch it to start recording.
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 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 web application over the browser.
The web application will get open. The first mode is the Record mode in which you to perform and record all the actions on a web application.
Perform the desired actions. All the actions will get recorded.
Using Spy Mode of Recorder
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 web application over the browser.
Flowchart showing the Working of Recording via. OpKey Smart Recorder
The web application will get open. The first mode is the Record mode in which you to perform and record all the actions on a web application.
- Perform the desired actions. All the actions will get recorded.
- In Case, few actions are performed on the Desktop like uploading a file, then it allows you to record them too.
- All you need to do is to switch from web to Desktop mode.
Now, you can record the actions performed on the Desktop application.
The actions will get recorded with Desktop specific keywords:
Getting Familiar with the Icons of the Web Recorder Window –
Using Spy Mode of Recorder
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 Selenium- JS.
- 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 Web Application through OpKey Web recorder.