SlideShare uma empresa Scribd logo
1 de 17
Case Selenium
www.Seleniumonlinetraining.info
1. Acceptance testing
1. What you should test?
2.Robot Framework
3. Selenium
1. Syntax
2.Xpath
3. Command types
4.Common commands
5. Terms
4.Features
5. Demo
6.Tips’n’tricks
7. Selenium RS
www.Seleniumonlinetraining.info
• vs. unit testing
• Acceptance testing = UI testing
• Suunto requires us to write tests
o Good
• Suunto requires
o use of Selenium
o use of Robot Framework
www.Seleniumonlinetraining.info
 Test expected content
 Test links
 Test functions
 Test dynamic elements
 …
 http://seleniumhq.org/docs/06_test_design_
considerations.html#what-to-test
www.Seleniumonlinetraining.info
• Environment to run Selenium tests
• Automated
• I know nothing of Robot Framework, but it must be cool
www.Seleniumonlinetraining.info
• Selenium is a suite of automated tool for testing web
application front end – UI test framework
• Selenium emulates browser user
• Selenium commands are like "write text "Panu" to input
which id is "name""
• Selenium's language supports simple scripting (operators,
defining variables)
• Selenium supports multiple methods to locate elements
• Element ID
• Element name attribute
• Xpath
• DOM
• CSS
www.Seleniumonlinetraining.info
• XML query language
• Features
o Selecting nodes
 by path
 by predicates
 with wildcards
o Axes
o Operators
o Examples:
• //div[@id='cartable']/table/tbody/tr/td[1]
• //input[@value='Jatka']
• RTFM: http://www.w3schools.com/XPath/xpath_syntax.asp
www.Seleniumonlinetraining.info
Syntax
command target value
eg.
verifyTextPresent id=phone 0700123123
www.Seleniumonlinetraining.info
• Actions are commands that generally manipulate the state of
the application. They do things like “click this link” and “select
that option”. If an Action fails, or has an error, the execution of
the current test is stopped.
• Accessors examine the state of the application and store the
results in variables, e.g. “storeTitle”. They are also used to
automatically generate Assertions.
• Assertions are like Accessors, but they verify that the state of
the application conforms to what is expected. Examples include
“make sure the page title is X” and “verify that this checkbox is
checked”.
www.Seleniumonlinetraining.info
Test are divided to
• Test suites
• Test cases
Test suites are built from test cases.
Both test cases AND test suites should be parameterised.
www.Seleniumonlinetraining.info
open
opens a page using a URL.
click/clickAndWait
performs a click operation, and optionally waits for a new page to load.
verifyTitle/assertTitle
verifies an expected page title.
verifyTextPresent
verifies expected text is somewhere on the page.
verifyElementPresent
verifies an expected UI element, as defined by its HTML tag, is present on the page.
verifyText
verifies expected text and it’s corresponding HTML tag are present on the page.
verifyTable
verifies a table’s expected contents.
waitForPageToLoad
pauses execution until an expected new page loads. Called automatically when clickAndWait is used.
waitForElementPresent
pauses execution until an expected UI element, as defined by its HTML tag, is present on the page.
www.Seleniumonlinetraining.info
 Firefox extension
 Very easy to get to know Selenium and to
play with it
 Also supports recording and running test
cases / suites
 http://seleniumhq.org/download/
 Features
 Recording tests, running tests, test cases, test
suites, breakpoints, pausing execution, export as
code
www.Seleniumonlinetraining.info
 B – set breakpoint
 X – execute command
 S – set starting point
 Good for debugging!
www.Seleniumonlinetraining.info
 Test Samuli’s application
 Transitions
 Adding cars, parameters
▪ Test constraints
 List cars
▪ Added cars are actually listened
www.Seleniumonlinetraining.info
• DON’t trust Selenium IDE or it’s default Xpath!
• You might have to change HTML code a bit to make it
easier to test automatically, eg. Add id/name attributes
• That’s completely OK!
• “AndWait” commands wait until whole page has been
loaded
• Very useful, but they don’t work with Ajax
• Difference between assert and verify
• If asset fails => test stops
• If verify fails => test continues
• echo command is good for debugging
www.Seleniumonlinetraining.info
 Selenium IDE has a poor support for programming, it does NOT
support
 condition statements
 iteration
 logging and reporting of test results
 error handling, particularly unexpected errors
 database testing
 test case grouping
 re-execution of failed tests
 test case dependency
 screenshot capture of test failures
 Selenium RS supports adding programming logic to tests
 .NET supported => though
 I have no experience
www.Seleniumonlinetraining.info
 http://seleniumhq.org/docs/index.html
 http://code.google.com/p/robotframework/
www.Seleniumonlinetraining.info

Mais conteúdo relacionado

Mais procurados

Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...Applitools
 
Apex Testing Deep Dive
Apex Testing Deep DiveApex Testing Deep Dive
Apex Testing Deep DiveAdam Olshansky
 
Selenium testing IDE 101
Selenium testing IDE 101Selenium testing IDE 101
Selenium testing IDE 101Adam Culp
 
Selenium interview questions
Selenium interview questionsSelenium interview questions
Selenium interview questionsgirichinna27
 
Selenium Interview Questions and Answers For Freshers And Experienced | Edureka
Selenium Interview Questions and Answers For Freshers And Experienced | EdurekaSelenium Interview Questions and Answers For Freshers And Experienced | Edureka
Selenium Interview Questions and Answers For Freshers And Experienced | EdurekaEdureka!
 
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...Edureka!
 
APIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page ObjectsAPIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page ObjectsSauce Labs
 
Client side unit tests - using jasmine & karma
Client side unit tests - using jasmine & karmaClient side unit tests - using jasmine & karma
Client side unit tests - using jasmine & karmaAdam Klein
 
Angular Unit Testing from the Trenches
Angular Unit Testing from the TrenchesAngular Unit Testing from the Trenches
Angular Unit Testing from the TrenchesJustin James
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to ProtractorFlorian Fesseler
 
Getting Started with Selenium
Getting Started with SeleniumGetting Started with Selenium
Getting Started with SeleniumDave Haeffner
 
JavaScript Testing VIA Selenium
JavaScript Testing VIA SeleniumJavaScript Testing VIA Selenium
JavaScript Testing VIA SeleniumAdam Christian
 
Galen Framework - Responsive Design Automation
Galen Framework - Responsive Design AutomationGalen Framework - Responsive Design Automation
Galen Framework - Responsive Design AutomationVenkat Ramana Reddy Parine
 
Angular Unit Testing NDC Minn 2018
Angular Unit Testing NDC Minn 2018Angular Unit Testing NDC Minn 2018
Angular Unit Testing NDC Minn 2018Justin James
 
Integration and Acceptance Testing
Integration and Acceptance TestingIntegration and Acceptance Testing
Integration and Acceptance TestingAlan Hecht
 
Automated layout testing using Galen Framework
Automated layout testing using Galen FrameworkAutomated layout testing using Galen Framework
Automated layout testing using Galen FrameworkSperasoft
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Applitools
 

Mais procurados (20)

Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
 
Apex Testing Deep Dive
Apex Testing Deep DiveApex Testing Deep Dive
Apex Testing Deep Dive
 
Selenium testing IDE 101
Selenium testing IDE 101Selenium testing IDE 101
Selenium testing IDE 101
 
Selenium interview questions
Selenium interview questionsSelenium interview questions
Selenium interview questions
 
Selenium Interview Questions and Answers For Freshers And Experienced | Edureka
Selenium Interview Questions and Answers For Freshers And Experienced | EdurekaSelenium Interview Questions and Answers For Freshers And Experienced | Edureka
Selenium Interview Questions and Answers For Freshers And Experienced | Edureka
 
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...
 
APIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page ObjectsAPIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page Objects
 
Client side unit tests - using jasmine & karma
Client side unit tests - using jasmine & karmaClient side unit tests - using jasmine & karma
Client side unit tests - using jasmine & karma
 
Angular Unit Testing from the Trenches
Angular Unit Testing from the TrenchesAngular Unit Testing from the Trenches
Angular Unit Testing from the Trenches
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
 
Getting Started with Selenium
Getting Started with SeleniumGetting Started with Selenium
Getting Started with Selenium
 
JavaScript Testing VIA Selenium
JavaScript Testing VIA SeleniumJavaScript Testing VIA Selenium
JavaScript Testing VIA Selenium
 
Galen Framework - Responsive Design Automation
Galen Framework - Responsive Design AutomationGalen Framework - Responsive Design Automation
Galen Framework - Responsive Design Automation
 
Angular Unit Testing
Angular Unit TestingAngular Unit Testing
Angular Unit Testing
 
Angular Unit Testing NDC Minn 2018
Angular Unit Testing NDC Minn 2018Angular Unit Testing NDC Minn 2018
Angular Unit Testing NDC Minn 2018
 
Cucumber with appium
Cucumber with appiumCucumber with appium
Cucumber with appium
 
Integration and Acceptance Testing
Integration and Acceptance TestingIntegration and Acceptance Testing
Integration and Acceptance Testing
 
Automated layout testing using Galen Framework
Automated layout testing using Galen FrameworkAutomated layout testing using Galen Framework
Automated layout testing using Galen Framework
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully
 
Angular Unit Test
Angular Unit TestAngular Unit Test
Angular Unit Test
 

Semelhante a Selenium (2)

Learn Test Automation using Selenium - Lesson 1
Learn Test Automation using Selenium - Lesson 1Learn Test Automation using Selenium - Lesson 1
Learn Test Automation using Selenium - Lesson 1Furqan Ud Din
 
Selenium using Java
Selenium using JavaSelenium using Java
Selenium using JavaF K
 
Selenium
SeleniumSelenium
Seleniumeduquer
 
Selenium tutorial
Selenium tutorialSelenium tutorial
Selenium tutorialmindqqa
 
selenium meetup sf talk march 2014 Selenium at Scale
selenium meetup sf talk march 2014 Selenium at Scaleselenium meetup sf talk march 2014 Selenium at Scale
selenium meetup sf talk march 2014 Selenium at ScaleDavid Louvton
 
Selenium Open Source Tool
Selenium Open Source ToolSelenium Open Source Tool
Selenium Open Source Toolonlinemindq
 
Salesforce selenium-saucelabs-webinar-april-2014
Salesforce selenium-saucelabs-webinar-april-2014Salesforce selenium-saucelabs-webinar-april-2014
Salesforce selenium-saucelabs-webinar-april-2014Sauce Labs
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfullyTEST Huddle
 

Semelhante a Selenium (2) (20)

Learn Test Automation using Selenium - Lesson 1
Learn Test Automation using Selenium - Lesson 1Learn Test Automation using Selenium - Lesson 1
Learn Test Automation using Selenium - Lesson 1
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
 
Selenium using Java
Selenium using JavaSelenium using Java
Selenium using Java
 
Selenium (1) (1)
Selenium (1) (1)Selenium (1) (1)
Selenium (1) (1)
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium Topic 2 IDE
Selenium Topic 2 IDESelenium Topic 2 IDE
Selenium Topic 2 IDE
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium tutorial
Selenium tutorialSelenium tutorial
Selenium tutorial
 
Automation Testing
Automation TestingAutomation Testing
Automation Testing
 
selenium meetup sf talk march 2014 Selenium at Scale
selenium meetup sf talk march 2014 Selenium at Scaleselenium meetup sf talk march 2014 Selenium at Scale
selenium meetup sf talk march 2014 Selenium at Scale
 
Selenium Open Source Tool
Selenium Open Source ToolSelenium Open Source Tool
Selenium Open Source Tool
 
Selenium.ppt
Selenium.pptSelenium.ppt
Selenium.ppt
 
Selenium at Salesforce Scale
Selenium at Salesforce ScaleSelenium at Salesforce Scale
Selenium at Salesforce Scale
 
Salesforce selenium-saucelabs-webinar-april-2014
Salesforce selenium-saucelabs-webinar-april-2014Salesforce selenium-saucelabs-webinar-april-2014
Salesforce selenium-saucelabs-webinar-april-2014
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
 

Último

Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/siemaillard
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfQucHHunhnh
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxCapitolTechU
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45MysoreMuleSoftMeetup
 
The Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptxThe Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptxNehaChandwani11
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdfVikramadityaRaj
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
Essential Safety precautions during monsoon season
Essential Safety precautions during monsoon seasonEssential Safety precautions during monsoon season
Essential Safety precautions during monsoon seasonMayur Khatri
 
An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxCeline George
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Celine George
 
How to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 InventoryHow to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 InventoryCeline George
 
MichaelStarkes_UncutGemsProjectSummary.pdf
MichaelStarkes_UncutGemsProjectSummary.pdfMichaelStarkes_UncutGemsProjectSummary.pdf
MichaelStarkes_UncutGemsProjectSummary.pdfmstarkes24
 
Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024CapitolTechU
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17Celine George
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxheathfieldcps1
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Celine George
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...Nguyen Thanh Tu Collection
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesRased Khan
 

Último (20)

Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
 
The Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptxThe Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptx
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Essential Safety precautions during monsoon season
Essential Safety precautions during monsoon seasonEssential Safety precautions during monsoon season
Essential Safety precautions during monsoon season
 
An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptx
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 
How to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 InventoryHow to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 Inventory
 
MichaelStarkes_UncutGemsProjectSummary.pdf
MichaelStarkes_UncutGemsProjectSummary.pdfMichaelStarkes_UncutGemsProjectSummary.pdf
MichaelStarkes_UncutGemsProjectSummary.pdf
 
Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 

Selenium (2)

  • 2. 1. Acceptance testing 1. What you should test? 2.Robot Framework 3. Selenium 1. Syntax 2.Xpath 3. Command types 4.Common commands 5. Terms 4.Features 5. Demo 6.Tips’n’tricks 7. Selenium RS www.Seleniumonlinetraining.info
  • 3. • vs. unit testing • Acceptance testing = UI testing • Suunto requires us to write tests o Good • Suunto requires o use of Selenium o use of Robot Framework www.Seleniumonlinetraining.info
  • 4.  Test expected content  Test links  Test functions  Test dynamic elements  …  http://seleniumhq.org/docs/06_test_design_ considerations.html#what-to-test www.Seleniumonlinetraining.info
  • 5. • Environment to run Selenium tests • Automated • I know nothing of Robot Framework, but it must be cool www.Seleniumonlinetraining.info
  • 6. • Selenium is a suite of automated tool for testing web application front end – UI test framework • Selenium emulates browser user • Selenium commands are like "write text "Panu" to input which id is "name"" • Selenium's language supports simple scripting (operators, defining variables) • Selenium supports multiple methods to locate elements • Element ID • Element name attribute • Xpath • DOM • CSS www.Seleniumonlinetraining.info
  • 7. • XML query language • Features o Selecting nodes  by path  by predicates  with wildcards o Axes o Operators o Examples: • //div[@id='cartable']/table/tbody/tr/td[1] • //input[@value='Jatka'] • RTFM: http://www.w3schools.com/XPath/xpath_syntax.asp www.Seleniumonlinetraining.info
  • 8. Syntax command target value eg. verifyTextPresent id=phone 0700123123 www.Seleniumonlinetraining.info
  • 9. • Actions are commands that generally manipulate the state of the application. They do things like “click this link” and “select that option”. If an Action fails, or has an error, the execution of the current test is stopped. • Accessors examine the state of the application and store the results in variables, e.g. “storeTitle”. They are also used to automatically generate Assertions. • Assertions are like Accessors, but they verify that the state of the application conforms to what is expected. Examples include “make sure the page title is X” and “verify that this checkbox is checked”. www.Seleniumonlinetraining.info
  • 10. Test are divided to • Test suites • Test cases Test suites are built from test cases. Both test cases AND test suites should be parameterised. www.Seleniumonlinetraining.info
  • 11. open opens a page using a URL. click/clickAndWait performs a click operation, and optionally waits for a new page to load. verifyTitle/assertTitle verifies an expected page title. verifyTextPresent verifies expected text is somewhere on the page. verifyElementPresent verifies an expected UI element, as defined by its HTML tag, is present on the page. verifyText verifies expected text and it’s corresponding HTML tag are present on the page. verifyTable verifies a table’s expected contents. waitForPageToLoad pauses execution until an expected new page loads. Called automatically when clickAndWait is used. waitForElementPresent pauses execution until an expected UI element, as defined by its HTML tag, is present on the page. www.Seleniumonlinetraining.info
  • 12.  Firefox extension  Very easy to get to know Selenium and to play with it  Also supports recording and running test cases / suites  http://seleniumhq.org/download/  Features  Recording tests, running tests, test cases, test suites, breakpoints, pausing execution, export as code www.Seleniumonlinetraining.info
  • 13.  B – set breakpoint  X – execute command  S – set starting point  Good for debugging! www.Seleniumonlinetraining.info
  • 14.  Test Samuli’s application  Transitions  Adding cars, parameters ▪ Test constraints  List cars ▪ Added cars are actually listened www.Seleniumonlinetraining.info
  • 15. • DON’t trust Selenium IDE or it’s default Xpath! • You might have to change HTML code a bit to make it easier to test automatically, eg. Add id/name attributes • That’s completely OK! • “AndWait” commands wait until whole page has been loaded • Very useful, but they don’t work with Ajax • Difference between assert and verify • If asset fails => test stops • If verify fails => test continues • echo command is good for debugging www.Seleniumonlinetraining.info
  • 16.  Selenium IDE has a poor support for programming, it does NOT support  condition statements  iteration  logging and reporting of test results  error handling, particularly unexpected errors  database testing  test case grouping  re-execution of failed tests  test case dependency  screenshot capture of test failures  Selenium RS supports adding programming logic to tests  .NET supported => though  I have no experience www.Seleniumonlinetraining.info