SlideShare a Scribd company logo
2
Most read
7
Most read
8
Most read
Introduction to Robot Framework and
Selenium2Library
Krishantha Samaraweera
WSO2 Inc.
Agenda
● Introduction to Robot
● Hello World Demo
● What is Selenium2library
● Ride IDE
● Maven and Ant plugin
● Demo time Again
Introduction
● Generic Test Automation Framework
● Keyword Driven Development
● Open source
○ Apache 2.0 License
○ Sponsored by Nokia Siemens networks and It was created by
Pekka Klärck as part of his master's thesis
● Based on Python
○ Can be extended using java or Python
○ Support for jython and ironPython
● Active Developer Community
● Hosted on Google code but moving to GIT now.
Demo - Hello World
image source : http://midches.com/for-customers/training-centers/
Installation on Linux
● Intall PIP
easy_install pip
● Install Python
pip install python
● Install Jyton (Optinal)
sudo apt-get install jython
● Install robot framework
pip install robotframework | easy_install robotframework
● Install ride (The IDE for robot test case writing)
pip install robotframework-ride | easy_install robotframework-ride
● Install Selenium2Library - Selenium implementation compatible with robot
pip install robotframework-selenium2library |
easy_install robotframework-selenium2library
Installation on Windows
- Windows Installer
● Separate graphical installers for 32 bit and 64 bit Windows systems
● robotframework-<version>.win-amd64.exe
- Stand-alone JAR package
● Robot Framework is also available as a stand-alone robotframework.
jar package.
● This package contains Jython and thus requires only JVM
○ java -jar robotframework.jar run [options] data_sources
- Use Python package installers
- Install from Source
Support for different runtimes
Environment Command
Python pybot
Jython jybot
Iron Python ipybot
Test Structure
Selenium Keyword
Open Browser <url> <browser>
Input Text <locator>
Click Button <locator>
Click Link
Close Browser
More Keywords
Add Cookie · Alert Should Be Present · Assign Id To Element · Capture Page Screenshot · Checkbox Should Be Selected · Checkbox Should Not
Be Selected ·Choose Cancel On Next Confirmation · Choose File · Choose Ok On Next Confirmation · Click Button · Click Element · Click Element
At Coordinates · Click Image · Click Link ·Close All Browsers · Close Browser · Close Window · Confirm Action · Create Webdriver · Current Frame
Contains · Current Frame Should Not Contain · Delete All Cookies ·Delete Cookie · Double Click Element · Drag And Drop · Drag And Drop By
Offset · Element Should Be Disabled · Element Should Be Enabled · Element Should Be Visible ·Element Should Contain · Element Should Not Be
Visible · Element Text Should Be · Execute Async Javascript · Execute Javascript · Focus · Frame Should Contain ·Get Alert Message · Get All
Links · Get Cookie Value · Get Cookies · Get Element Attribute · Get Horizontal Position · Get List Items · Get Location · Get Matching Xpath
Count ·Get Selected List Label · Get Selected List Labels · Get Selected List Value · Get Selected List Values · Get Selenium Implicit Wait · Get
Selenium Speed · Get Selenium Timeout ·Get Source · Get Table Cell · Get Text · Get Title · Get Value · Get Vertical Position · Get Window
Identifiers · Get Window Names · Get Window Size · Get Window Titles · Go Back ·Go To · Input Password · Input Text · List Selection Should Be ·
List Should Have No Selections · Location Should Be · Location Should Contain · Log Location · Log Source · Log Title ·Maximize Browser
Window · Mouse Down · Mouse Down On Image · Mouse Down On Link · Mouse Out · Mouse Over · Mouse Up · Open Browser · Open Context
Menu ·Page Should Contain · Page Should Contain Button · Page Should Contain Checkbox · Page Should Contain Element · Page Should
Contain Image · Page Should Contain Link ·Page Should Contain List · Page Should Contain Radio Button · Page Should Contain Textfield · Page
Should Not Contain · Page Should Not Contain Button ·Page Should Not Contain Checkbox · Page Should Not Contain Element · Page Should Not
Contain Image · Page Should Not Contain Link · Page Should Not Contain List ·Page Should Not Contain Radio Button · Page Should Not Contain
Textfield · Press Key · Radio Button Should Be Set To · Radio Button Should Not Be Selected ·Register Keyword To Run On Failure · Reload
Page · Select All From List · Select Checkbox · Select Frame · Select From List · Select From List By Index · Select From List By Label ·Select
From List By Value · Select Radio Button · Select Window · Set Browser Implicit Wait · Set Selenium Implicit Wait · Set Selenium Speed · Set
Selenium Timeout ·Set Window Size · Simulate · Submit Form · Switch Browser · Table Cell Should Contain · Table Column Should Contain ·
Table Footer Should Contain · Table Header Should Contain ·Table Row Should Contain · Table Should Contain · Textarea Should Contain ·
Textarea Value Should Be · Textfield Should Contain · Textfield Value Should Be · Title Should Be ·Unselect Checkbox · Unselect Frame ·
Unselect From List · Unselect From List By Index · Unselect From List By Label · Unselect From List By Value · Wait For Condition ·Wait Until
Element Is Visible · Wait Until Page Contains · Wait Until Page Contains Element · Xpath Should Match X Times
http://rtomac.github.io/robotframework-selenium2library/doc/Selenium2Library.
html
Tabular Format
● Simple tabular format
Robot Standard Libraries
● Included in normal installation
○ Operating System
○ Screenshot
○ Dialog
○ Telnet
○ XML
○ String
○ Process
○ Remote
Robot External Libraries
● Not Included in normal installation. Need to install
separately.
○ Selenium2Library
○ HTTP
○ Android
○ MongoDB
○ iOS
○ SSH
○ Database
○ AutoItLibrary
Page Should Contain Google
One Spacebar
Be Careful
Four Spacebars
Selenium2Library
● Web Testing Library for Robot Framework.
● Runs on Real Browser instance.
● InBuild API keywords for easy usage.
Selenium2Library Vs Webdriver API
Selenium 2 Webdriver Iterating Table
C# Example
public void VerifyTable(string header, string expected)
{
IWebElement table = _driverWithJs.FindElement(By.XPath("//div[@id='main']/table"));
ReadOnlyCollection<IWebElement> allRows = table.FindElements(By.TagName("tr"));
for (int z = 0; z < allRows.Count; z++)
{
ReadOnlyCollection<IWebElement> cells = allRows[z].FindElements(By.TagName("td"));
for (int y = 0; y < cells.Count; y++)
{
var value = allRows[z].FindElements(By.TagName("td"))[y].Text;
if (value.Equals(header))
{
Assert.AreEqual(expected, allRows[z].FindElements(By.TagName("td"))[y + 1].Text);
}
}
}
}
Robot keyword for Iterating Table
Table Should Contain table_locator, expected, loglevel=INFO
Selenium2Library
● Lookup Strategy
Test Data Editor - RIDE
Custom Keyword Library
Image source : http://midches.com/for-customers/training-centers/
Maven Plugin
● Robot Framework in a Maven project without the need to
install anything extra.
<plugin>
<groupId>org.robotframework</groupId>
<artifactId>robotframework-maven-plugin</artifactId>
<version>1.4.2</version>
<executions>
<execution>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
Ant Task
● RobotAnt is a ant task for using robotframework inside
ant build scripts.
<robotant
data_sources="TestSelenium.html"
loglevel="INFO"
debugfile="jybot.log"
outputdir="results"
maxmemory="512m">
<classpath>
<pathelement location="libext/robotframework-2.5.5.jar"/>
<pathelement location="lib/Lib"/>
</classpath>
</robotant>
External variable files
● External file to declare variables.
● To follow DRY (Don’t repeat yourself)
● Can be created in python or java files.
*** Variables ***
${Weather} London Cloudy 25
${humidity} 75
${MARKS} 65.5
@{DAYS} Monday Wednesday Friday
Sunday
For more information
● The main information hub http://robotframework.org
● Quick Start Guide
– Executable guide demonstrating the key features
– http://code.google.com/p/robotframework/wiki/QuickStartGuide
● User Guide
– Detailed information about all features of the framework
– http://code.google.com/p/robotframework/wiki/UserGuide
Questions?
Thanks!
Image source : http://ciprianocounseling.com/frequently-asked-questions/

More Related Content

What's hot (20)

PDF
Robot Framework Introduction & Sauce Labs Integration
Sauce Labs
 
PDF
Robot Framework :: Demo login application
Somkiat Puisungnoen
 
PDF
Introduction to Robot Framework – Exove
Exove
 
PPTX
Robot framework
boriau
 
PPTX
Scripting robot
Chonlasith Jucksriporn
 
PPTX
Setting up Page Object Model in Automation Framework
valuebound
 
PDF
Robot Framework Dos And Don'ts
Pekka Klärck
 
ODP
BDD with Cucumber
Knoldus Inc.
 
PPTX
Test Automation Framework with BDD and Cucumber
Rhoynar Software Consulting
 
PPTX
Cucumber BDD
Pravin Dsilva
 
PPT
Selenium Automation Framework
Mindfire Solutions
 
PPT
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
PDF
Page Object Model and Implementation in Selenium
Zoe Gilbert
 
PDF
Selenium with Cucumber
Knoldus Inc.
 
PDF
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Edureka!
 
PDF
Cucumber ppt
Qwinix Technologies
 
PPTX
BDD WITH CUCUMBER AND JAVA
Srinivas Katakam
 
PPTX
Automation - web testing with selenium
Tzirla Rozental
 
PDF
Appium & Robot Framework
Furkan Ertürk
 
Robot Framework Introduction & Sauce Labs Integration
Sauce Labs
 
Robot Framework :: Demo login application
Somkiat Puisungnoen
 
Introduction to Robot Framework – Exove
Exove
 
Robot framework
boriau
 
Scripting robot
Chonlasith Jucksriporn
 
Setting up Page Object Model in Automation Framework
valuebound
 
Robot Framework Dos And Don'ts
Pekka Klärck
 
BDD with Cucumber
Knoldus Inc.
 
Test Automation Framework with BDD and Cucumber
Rhoynar Software Consulting
 
Cucumber BDD
Pravin Dsilva
 
Selenium Automation Framework
Mindfire Solutions
 
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
Page Object Model and Implementation in Selenium
Zoe Gilbert
 
Selenium with Cucumber
Knoldus Inc.
 
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Edureka!
 
Cucumber ppt
Qwinix Technologies
 
BDD WITH CUCUMBER AND JAVA
Srinivas Katakam
 
Automation - web testing with selenium
Tzirla Rozental
 
Appium & Robot Framework
Furkan Ertürk
 

Viewers also liked (18)

ZIP
Robot Framework Introduction
laurent bristiel
 
PDF
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
Acceptance testing plone sites and add ons with robot framework and selenium
Asko Soukka
 
PDF
Introduction to Robot Framework
Carl Su
 
PPTX
Acceptance Test Driven Development and Robot Framework
Steve Zhang
 
PDF
Robot framework - Lord of the Rings
Asheesh Mehdiratta
 
PPTX
Robot Framework : Lord of the Rings By Asheesh M
Agile Testing Alliance
 
PPT
Testing More With Less
Tom Swain
 
PPTX
Steps to register a foreign invested company
Б. Нарангэрэл
 
PPT
Robotframework Presentation - Pinoy Python Meetup 2011January12
Franz Allan See
 
PDF
Introduction to Robot Framework (external)
Zhe Li
 
PDF
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
Xebia Nederland BV
 
PDF
Automatisations des tests fonctionnels avec Robot Framework
laurent bristiel
 
PPTX
Integration Group - Robot Framework
OpenDaylight
 
PPT
Acceptance Test Driven Development using Robot Framework
Asheesh Mehdiratta
 
PPTX
Web testing automation
kuozui
 
PDF
Barcamp Bangkhen :: Robot Framework
Somkiat Puisungnoen
 
PDF
Stressez votre application web avec Gatling
laurent bristiel
 
Robot Framework Introduction
laurent bristiel
 
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Acceptance testing plone sites and add ons with robot framework and selenium
Asko Soukka
 
Introduction to Robot Framework
Carl Su
 
Acceptance Test Driven Development and Robot Framework
Steve Zhang
 
Robot framework - Lord of the Rings
Asheesh Mehdiratta
 
Robot Framework : Lord of the Rings By Asheesh M
Agile Testing Alliance
 
Testing More With Less
Tom Swain
 
Steps to register a foreign invested company
Б. Нарангэрэл
 
Robotframework Presentation - Pinoy Python Meetup 2011January12
Franz Allan See
 
Introduction to Robot Framework (external)
Zhe Li
 
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
Xebia Nederland BV
 
Automatisations des tests fonctionnels avec Robot Framework
laurent bristiel
 
Integration Group - Robot Framework
OpenDaylight
 
Acceptance Test Driven Development using Robot Framework
Asheesh Mehdiratta
 
Web testing automation
kuozui
 
Barcamp Bangkhen :: Robot Framework
Somkiat Puisungnoen
 
Stressez votre application web avec Gatling
laurent bristiel
 
Ad

Similar to Robot framework and selenium2 library (20)

PPTX
Selenium.pptx
Pandiya Rajan
 
PPTX
Selenium presentation
shivani thakur
 
PDF
Selenium course training institute ameerpet hyderabad – Best software trainin...
Sathya Technologies
 
PDF
Selenium course training institute ameerpet hyderabad
Sathya Technologies
 
DOCX
What is selenium
Pesara Swamy
 
PPTX
Learn SELENIUM at ASIT
ASIT
 
PPTX
Selenium
giselle aga
 
PDF
Selenium -Test automation for web applications
AnisGhelissi
 
PDF
Learning selenium sample
Minnu Jayaprakash
 
PPT
selenium training | selenium course | selenium video tutorial | selenium for ...
Nancy Thomas
 
PPTX
Selenium web driver
Roman Savitskiy
 
PPTX
Selenium Training in Chennai Demo Part-2
Thecreating Experts
 
PPTX
Lesson2-Selenium installation 2-6-25.pptx
131881omarfernandez1
 
PDF
Selenium documentation 1.0
Bharath Marrivada
 
PDF
Web driver selenium simplified
Vikas Singh
 
PDF
Selenium Ide Tutorial
metapix
 
PDF
Introduction to Selenium and Test Automation
Ahmed Mubbashir Khan
 
PDF
Gilt Groupe's Selenium 2 Conversion Challenges
Sauce Labs
 
PDF
Android testing-with-selenium-webdriver Online Training
Nagendra Kumar
 
PDF
Selenium Automation Testing - A Complete Guide.pdf
kalichargn70th171
 
Selenium.pptx
Pandiya Rajan
 
Selenium presentation
shivani thakur
 
Selenium course training institute ameerpet hyderabad – Best software trainin...
Sathya Technologies
 
Selenium course training institute ameerpet hyderabad
Sathya Technologies
 
What is selenium
Pesara Swamy
 
Learn SELENIUM at ASIT
ASIT
 
Selenium
giselle aga
 
Selenium -Test automation for web applications
AnisGhelissi
 
Learning selenium sample
Minnu Jayaprakash
 
selenium training | selenium course | selenium video tutorial | selenium for ...
Nancy Thomas
 
Selenium web driver
Roman Savitskiy
 
Selenium Training in Chennai Demo Part-2
Thecreating Experts
 
Lesson2-Selenium installation 2-6-25.pptx
131881omarfernandez1
 
Selenium documentation 1.0
Bharath Marrivada
 
Web driver selenium simplified
Vikas Singh
 
Selenium Ide Tutorial
metapix
 
Introduction to Selenium and Test Automation
Ahmed Mubbashir Khan
 
Gilt Groupe's Selenium 2 Conversion Challenges
Sauce Labs
 
Android testing-with-selenium-webdriver Online Training
Nagendra Kumar
 
Selenium Automation Testing - A Complete Guide.pdf
kalichargn70th171
 
Ad

Recently uploaded (20)

PDF
NFPA 10 - Estandar para extintores de incendios portatiles (ed.22 ENG).pdf
Oscar Orozco
 
PPT
FINAL plumbing code for board exam passer
MattKristopherDiaz
 
PPTX
Electrical_Safety_EMI_EMC_Presentation.pptx
drmaneharshalid
 
PDF
MODULE-5 notes [BCG402-CG&V] PART-B.pdf
Alvas Institute of Engineering and technology, Moodabidri
 
PPTX
Alan Turing - life and importance for all of us now
Pedro Concejero
 
PDF
June 2025 - Top 10 Read Articles in Network Security and Its Applications
IJNSA Journal
 
PPTX
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
PPSX
OOPS Concepts in Python and Exception Handling
Dr. A. B. Shinde
 
PPTX
UNIT 1 - INTRODUCTION TO AI and AI tools and basic concept
gokuld13012005
 
DOCX
Engineering Geology Field Report to Malekhu .docx
justprashant567
 
PDF
LLC CM NCP1399 SIMPLIS MODEL MANUAL.PDF
ssuser1be9ce
 
PDF
13th International Conference of Security, Privacy and Trust Management (SPTM...
ijcisjournal
 
PDF
Bayesian Learning - Naive Bayes Algorithm
Sharmila Chidaravalli
 
PPTX
Engineering Quiz ShowEngineering Quiz Show
CalvinLabial
 
PDF
CLIP_Internals_and_Architecture.pdf sdvsdv sdv
JoseLuisCahuanaRamos3
 
PPTX
Precooling and Refrigerated storage.pptx
ThongamSunita
 
PDF
Plant Control_EST_85520-01_en_AllChanges_20220127.pdf
DarshanaChathuranga4
 
PPTX
Diabetes diabetes diabetes diabetes jsnsmxndm
130SaniyaAbduNasir
 
PDF
Clustering Algorithms - Kmeans,Min ALgorithm
Sharmila Chidaravalli
 
PPTX
darshai cross section and river section analysis
muk7971
 
NFPA 10 - Estandar para extintores de incendios portatiles (ed.22 ENG).pdf
Oscar Orozco
 
FINAL plumbing code for board exam passer
MattKristopherDiaz
 
Electrical_Safety_EMI_EMC_Presentation.pptx
drmaneharshalid
 
MODULE-5 notes [BCG402-CG&V] PART-B.pdf
Alvas Institute of Engineering and technology, Moodabidri
 
Alan Turing - life and importance for all of us now
Pedro Concejero
 
June 2025 - Top 10 Read Articles in Network Security and Its Applications
IJNSA Journal
 
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
OOPS Concepts in Python and Exception Handling
Dr. A. B. Shinde
 
UNIT 1 - INTRODUCTION TO AI and AI tools and basic concept
gokuld13012005
 
Engineering Geology Field Report to Malekhu .docx
justprashant567
 
LLC CM NCP1399 SIMPLIS MODEL MANUAL.PDF
ssuser1be9ce
 
13th International Conference of Security, Privacy and Trust Management (SPTM...
ijcisjournal
 
Bayesian Learning - Naive Bayes Algorithm
Sharmila Chidaravalli
 
Engineering Quiz ShowEngineering Quiz Show
CalvinLabial
 
CLIP_Internals_and_Architecture.pdf sdvsdv sdv
JoseLuisCahuanaRamos3
 
Precooling and Refrigerated storage.pptx
ThongamSunita
 
Plant Control_EST_85520-01_en_AllChanges_20220127.pdf
DarshanaChathuranga4
 
Diabetes diabetes diabetes diabetes jsnsmxndm
130SaniyaAbduNasir
 
Clustering Algorithms - Kmeans,Min ALgorithm
Sharmila Chidaravalli
 
darshai cross section and river section analysis
muk7971
 

Robot framework and selenium2 library

  • 1. Introduction to Robot Framework and Selenium2Library Krishantha Samaraweera WSO2 Inc.
  • 2. Agenda ● Introduction to Robot ● Hello World Demo ● What is Selenium2library ● Ride IDE ● Maven and Ant plugin ● Demo time Again
  • 3. Introduction ● Generic Test Automation Framework ● Keyword Driven Development ● Open source ○ Apache 2.0 License ○ Sponsored by Nokia Siemens networks and It was created by Pekka Klärck as part of his master's thesis ● Based on Python ○ Can be extended using java or Python ○ Support for jython and ironPython ● Active Developer Community ● Hosted on Google code but moving to GIT now.
  • 4. Demo - Hello World image source : http://midches.com/for-customers/training-centers/
  • 5. Installation on Linux ● Intall PIP easy_install pip ● Install Python pip install python ● Install Jyton (Optinal) sudo apt-get install jython ● Install robot framework pip install robotframework | easy_install robotframework ● Install ride (The IDE for robot test case writing) pip install robotframework-ride | easy_install robotframework-ride ● Install Selenium2Library - Selenium implementation compatible with robot pip install robotframework-selenium2library | easy_install robotframework-selenium2library
  • 6. Installation on Windows - Windows Installer ● Separate graphical installers for 32 bit and 64 bit Windows systems ● robotframework-<version>.win-amd64.exe - Stand-alone JAR package ● Robot Framework is also available as a stand-alone robotframework. jar package. ● This package contains Jython and thus requires only JVM ○ java -jar robotframework.jar run [options] data_sources - Use Python package installers - Install from Source
  • 7. Support for different runtimes Environment Command Python pybot Jython jybot Iron Python ipybot
  • 9. Selenium Keyword Open Browser <url> <browser> Input Text <locator> Click Button <locator> Click Link Close Browser
  • 10. More Keywords Add Cookie · Alert Should Be Present · Assign Id To Element · Capture Page Screenshot · Checkbox Should Be Selected · Checkbox Should Not Be Selected ·Choose Cancel On Next Confirmation · Choose File · Choose Ok On Next Confirmation · Click Button · Click Element · Click Element At Coordinates · Click Image · Click Link ·Close All Browsers · Close Browser · Close Window · Confirm Action · Create Webdriver · Current Frame Contains · Current Frame Should Not Contain · Delete All Cookies ·Delete Cookie · Double Click Element · Drag And Drop · Drag And Drop By Offset · Element Should Be Disabled · Element Should Be Enabled · Element Should Be Visible ·Element Should Contain · Element Should Not Be Visible · Element Text Should Be · Execute Async Javascript · Execute Javascript · Focus · Frame Should Contain ·Get Alert Message · Get All Links · Get Cookie Value · Get Cookies · Get Element Attribute · Get Horizontal Position · Get List Items · Get Location · Get Matching Xpath Count ·Get Selected List Label · Get Selected List Labels · Get Selected List Value · Get Selected List Values · Get Selenium Implicit Wait · Get Selenium Speed · Get Selenium Timeout ·Get Source · Get Table Cell · Get Text · Get Title · Get Value · Get Vertical Position · Get Window Identifiers · Get Window Names · Get Window Size · Get Window Titles · Go Back ·Go To · Input Password · Input Text · List Selection Should Be · List Should Have No Selections · Location Should Be · Location Should Contain · Log Location · Log Source · Log Title ·Maximize Browser Window · Mouse Down · Mouse Down On Image · Mouse Down On Link · Mouse Out · Mouse Over · Mouse Up · Open Browser · Open Context Menu ·Page Should Contain · Page Should Contain Button · Page Should Contain Checkbox · Page Should Contain Element · Page Should Contain Image · Page Should Contain Link ·Page Should Contain List · Page Should Contain Radio Button · Page Should Contain Textfield · Page Should Not Contain · Page Should Not Contain Button ·Page Should Not Contain Checkbox · Page Should Not Contain Element · Page Should Not Contain Image · Page Should Not Contain Link · Page Should Not Contain List ·Page Should Not Contain Radio Button · Page Should Not Contain Textfield · Press Key · Radio Button Should Be Set To · Radio Button Should Not Be Selected ·Register Keyword To Run On Failure · Reload Page · Select All From List · Select Checkbox · Select Frame · Select From List · Select From List By Index · Select From List By Label ·Select From List By Value · Select Radio Button · Select Window · Set Browser Implicit Wait · Set Selenium Implicit Wait · Set Selenium Speed · Set Selenium Timeout ·Set Window Size · Simulate · Submit Form · Switch Browser · Table Cell Should Contain · Table Column Should Contain · Table Footer Should Contain · Table Header Should Contain ·Table Row Should Contain · Table Should Contain · Textarea Should Contain · Textarea Value Should Be · Textfield Should Contain · Textfield Value Should Be · Title Should Be ·Unselect Checkbox · Unselect Frame · Unselect From List · Unselect From List By Index · Unselect From List By Label · Unselect From List By Value · Wait For Condition ·Wait Until Element Is Visible · Wait Until Page Contains · Wait Until Page Contains Element · Xpath Should Match X Times http://rtomac.github.io/robotframework-selenium2library/doc/Selenium2Library. html
  • 11. Tabular Format ● Simple tabular format
  • 12. Robot Standard Libraries ● Included in normal installation ○ Operating System ○ Screenshot ○ Dialog ○ Telnet ○ XML ○ String ○ Process ○ Remote
  • 13. Robot External Libraries ● Not Included in normal installation. Need to install separately. ○ Selenium2Library ○ HTTP ○ Android ○ MongoDB ○ iOS ○ SSH ○ Database ○ AutoItLibrary
  • 14. Page Should Contain Google One Spacebar Be Careful Four Spacebars
  • 15. Selenium2Library ● Web Testing Library for Robot Framework. ● Runs on Real Browser instance. ● InBuild API keywords for easy usage.
  • 16. Selenium2Library Vs Webdriver API Selenium 2 Webdriver Iterating Table C# Example public void VerifyTable(string header, string expected) { IWebElement table = _driverWithJs.FindElement(By.XPath("//div[@id='main']/table")); ReadOnlyCollection<IWebElement> allRows = table.FindElements(By.TagName("tr")); for (int z = 0; z < allRows.Count; z++) { ReadOnlyCollection<IWebElement> cells = allRows[z].FindElements(By.TagName("td")); for (int y = 0; y < cells.Count; y++) { var value = allRows[z].FindElements(By.TagName("td"))[y].Text; if (value.Equals(header)) { Assert.AreEqual(expected, allRows[z].FindElements(By.TagName("td"))[y + 1].Text); } } } } Robot keyword for Iterating Table Table Should Contain table_locator, expected, loglevel=INFO
  • 19. Custom Keyword Library Image source : http://midches.com/for-customers/training-centers/
  • 20. Maven Plugin ● Robot Framework in a Maven project without the need to install anything extra. <plugin> <groupId>org.robotframework</groupId> <artifactId>robotframework-maven-plugin</artifactId> <version>1.4.2</version> <executions> <execution> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin>
  • 21. Ant Task ● RobotAnt is a ant task for using robotframework inside ant build scripts. <robotant data_sources="TestSelenium.html" loglevel="INFO" debugfile="jybot.log" outputdir="results" maxmemory="512m"> <classpath> <pathelement location="libext/robotframework-2.5.5.jar"/> <pathelement location="lib/Lib"/> </classpath> </robotant>
  • 22. External variable files ● External file to declare variables. ● To follow DRY (Don’t repeat yourself) ● Can be created in python or java files. *** Variables *** ${Weather} London Cloudy 25 ${humidity} 75 ${MARKS} 65.5 @{DAYS} Monday Wednesday Friday Sunday
  • 23. For more information ● The main information hub http://robotframework.org ● Quick Start Guide – Executable guide demonstrating the key features – http://code.google.com/p/robotframework/wiki/QuickStartGuide ● User Guide – Detailed information about all features of the framework – http://code.google.com/p/robotframework/wiki/UserGuide
  • 24. Questions? Thanks! Image source : http://ciprianocounseling.com/frequently-asked-questions/