Implement Robot Framework using RIDE (Part-2)

In our part-1 we learned how to work with  existing test case written as .robot/.txt inside RIDE.

Here we would learn to implement the robot framework functionality in RIDE itself.Further we would move towards best approach in RF.
Do follow us on  Fb,G+,Twitter, it encourages us to learn and share more.

Requirement:- Enhance our existing test case using RIDE?

Adding new Test Case to existing functionality.

Right click Test Suite > New Test Case > Name ([TC-002]-Search Robot onthe opened Application).

Adding new test case in RIDE
Test case added in RIDE
Note:- We could have done the same using “Text Edit” tab.
Adding Test Steps for the newly created test case.
Click on the Test case Name (TC-002) and on right side under “Edit” tab, enter the test steps.

Test Step 1:- Search The Given Topic On Home Page Of Application
Test Step 2:– Click On The First Searched Link

Add test step in RIDE

Note:- Added Test Steps would be coming in black font, they would turn blue one’s RIDE is able to link them to the corresponding keywords.

Adding the Keywords for the created steps (Meaning using the Selenium2Library keywords to give meaning to the created test steps).

Right click the Test suite > New User Keyword > Name
Add user keywords in RIDE
Newly added keywords in RIDE

Select the newly created keyword -> Under “Edit” tab ->utilize the selenium2Library keywords to perform the operation .
Adding keywords in RIDE

Now if we click on the “Test Case”([TC-002]) we can see the color change as blue.

Link between test case and keywords
Incase we have already included the “Selenium2Library” in Setting table, we can utilize the intellisense available in RIDE to search for the required keyword from the selenium library.

Selenium2Library intellisense in RIDE

Here we would define “$TOPIC” variable used above in the keywords.
We can do the same from the explorer window but let’s try from the “Add Scalar” button.

Click on Test Suite Name -> on the right side click on “Add Scalar” button > Name/value/Comment
Creating variables in RIDE

 Save and run the test case

Result logs in RIDE (PASS)


*** Settings ***
Library Selenium2Library

*** Variables ***
${APP} uftHelp
${TOPIC} Robot Framework # Variable containing the Topic to be searched on Application

*** Test Cases ***
[TC-001]-Launching the browser and search and launch the 'uftHelp' Application on
Launch Browser
Search Application On Google
Launch Application

[TC-002]-Search Robot onthe opened Application
Search The Given Topic On Home Page Of Application
Click On The First Searched Link

*** Keywords ***
Launch Browser
Open Browser ${URL} ${BROWSER}
Maximize Browser Window

Search Application On Google
Input Text id=lst-ib ${APP}
Click Button name=btnG

Launch Application
Wait Until Element Is Visible link=User-Friendly Techy-Help 20 Seconds
Click Element link=User-Friendly Techy-Help

Search The Given Topic On Home Page Of Application
Input Text id=gsc-i-id1 ${TOPIC}
Click Element css=input.gsc-search-button.gsc-search-button-v2

Click On The First Searched Link
Wait Until Element Is Visible xpath=.//*[@id='___gcse_0']/div/div/div[1]/div[6]/div[2]/div[1]/div/div[2]/div[1]/div[1]/div/a 20 s
Click Element xpath=.//*[@id='___gcse_0']/div/div/div[1]/div[6]/div[2]/div[1]/div/div[2]/div[1]/div[1]/div/a
Hope you learned the basics of RIDE and enjoyed our tutorial. Keep learning 🙂


3 thoughts on “Implement Robot Framework using RIDE (Part-2)

Leave a Reply

Your email address will not be published. Required fields are marked *