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?
Step1:-
Adding new Test Case to existing functionality.
CODE:-
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?
Step1:-
Adding new Test Case to existing functionality.
Right click Test Suite > New Test Case > Name ([TC-002]-Search Robot onthe opened Application).
![]() |
Note:- We could have done the same using “Text Edit” tab.
Step2:-
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
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.
Step3:-
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
Select the newly created keyword -> Under “Edit” tab ->utilize the selenium2Library keywords to perform the operation .
Note:-
Now if we click on the “Test Case”([TC-002]) we can see the color change as blue.
Now if we click on the “Test Case”([TC-002]) we can see the color change as blue.
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.
Step4:-
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
Step5:-
Save and run the test case
CODE:-
*** Settings ***
Library Selenium2Library
*** Variables ***
${APP} uftHelp
${URL} https://www.google.ca
${BROWSER} CHROME
${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 Google.com
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 replies on “Implement Robot Framework using RIDE (Part-2)”
Hi Could you please help me how to write test suite file to execute multiple test cases in Robot Framework
hi the login button's value is as below. Robot frame work not identifying that. Any help ?
value=" Login "
Hi the element of the login button has the value as below, which is not detected by the robot frame work. Any help ?
value=" Login "