2. Directory
• Feature
• High Level Architecture
• Grammar
• Test Case
• Setting
• Variable
• Running Parameter
• Selenium2Library
• Locator
• Frequent Commands
3. Features
• Generic
• Keyword-Driven and Data-Driven
• BDD tools: RobotFrame(python), Cucumber(Java), Specflow(C#)
• Tabular Syntax
• Implemented with Python
• Can be extended natively using Python or Java
4. Directory
• Feature
• High Level Architecture
• Grammar
• Test Case
• Setting
• Variable
• Running Parameter
• Selenium2Library
• Locator
• Frequent Commands
8. Grammar
• Test Cases
Table Used for
Test Cases Creating test cases from available keywords.
Keywords Creating user keywords from existing lower-level
keywords
Settings 1) Importing test libraries, resource
files and variable files.
2) Defining metadata for test suites and test cases.
Variables Defining variables that can be used elsewhere in
the test data.
9. Grammar
• Keywords
Table Used for
Test Cases Creating test cases from available keywords.
Keywords Creating user keywords from existing lower-level
keywords
Settings 1) Importing test libraries, resource
files and variable files.
2) Defining metadata for test suites and test cases.
Variables Defining variables that can be used elsewhere in
the test data.
13. Directory
• Feature
• High Level Architecture
• Grammar
• Test Case
• Setting
• Variable
• Running Parameter
• Selenium2Library
• Locator
• Frequent Commands
14. Robot options
• -t ${testName}: support regex expression
• -e ${excluede_tag}
• -d ${outputdir}: support absolute and relative directory
• Beryllium Run:
Oxygen Run:
robot -t "White Online-193*" --outputdir log case/*.robot
set ROBOT_SYSLOG_FILE=rflog.txt
set ROBOT_SYSLOG_LEVEL=TRACE
set API_HYDROGEN_USER=yellow
set API_RISTRETTO_ENDPOINT=http://ristretto-aaa-services-v1.qa.ytech.co.nz
set APP_VERSION=.417
set BUSINESS_ASSET=/user/dashboard/#/assetEdit/784328
set BUSINESS_LISTING=/user/dashboard/#/assetEdit/784328
set DETAILED_LISTING=/y/tyre-world-auto-auckland
set PROJECT_URL=https://yellow.co.nz
DEL "C:Ellacodeberyllium_regression_test*.png"
robot -t "Show numbers" --exclude skip_prod pages/details_listing_page.robot
cmd.exe
15. Directory
• Feature
• High Level Architecture
• Grammar
• Test Case
• Setting
• Variable
• Running Parameter
• Selenium2Library
• Locator
• Frequent Commands
16. Selenium2Library
• Locator
Strategy Example Description
identifier
Click
Element | identifier=my_element
Matches by @id or @name
attribute
id Click Element | id=my_element Matches by @id attribute
name
Click
Element | name=my_element
Matches by @name attribute
xpath
Click
Element | xpath=//div[@id='my_e
lement']
Matches with arbitrary XPath
expression
dom
Click
Element | dom=document.images
[56]
Matches with arbitrary DOM
express
link Click Element | link=My Link
Matches anchor elements by their
link text
partial link Click Element | partial link=y Lin
Matches anchor elements by their
partial link text
css Click Element | css=div.my_class Matches by CSS selector
class Click Element | class=my_class Matches by class name selector
jquery
Click
Element | jquery=div.my_class
Matches by jQuery/sizzle selector
sizzle Click Element | sizzle=div.my_class Matches by jQuery/sizzle selector
tag Click Element | tag=div Matches by HTML tag name
default* Click Link | default=page?a=b
Matches key attributes with value
after first '='
17. Selenium2Library
• Xpath(Chrome)
• Chrome press F12 to call “Chrome DevTools”
• Choose Element Tab
• Click the icon
• Click the page element which you want to operate, Then the DevTools will
highlight the element.
• Right click the element in DevTool, choose Copy->Copy Xpath, Then xpath will
be in paste panel
• CSS(Chrome)
• SelectorGadget
The first session would be Robot Framework, as you request. I suggest we will have series session on sharing knowledges.
I will introduce these things. Feature would be what is robot framework , its strength. Also, we will see its architecture. After that, I will introduce Grammar which would be good for a newbie. Running parameter is when you run robot tests, you could set serveral parameter to define your this run. The last one would be Selenium library. Which is the most important library.
Demo 1
Table is surrounded by asterisk
*** Settings *** and *Settings work the same way
Demo 2
1) Importing test libraries, resource files and variable files.
2) Defining metadata for test suites and test cases.
test-case and test-suite -level setup and teardown.