SlideShare a Scribd company logo
1 of 38
Making Watir and Cucumber an
efficient tool for Web UI
Automation
Ruslan Strazhnyk
nCryptedCloud
About Me
Ruslan Strazhnyk
 Rich experience in creating Test Automation
Frameworks - Front-end, Back-end, API, Load
Testing
 Languages: Ruby, Python, Java, JS
 Technologies: Selenium, REST, CI, Jenkins, Jmeter
So many Frameworks?!
Why Not Robot Framework?
 Pros
 Similar to BDD/ATDD test writing
 Page Object implemented through Selenium2library
plugin
 Possible to write extensions in Python
 Produces output in html
 Cons
 Requires building own framework (with extensions)
 Requires learning RF own language for writing test
scenarios
 Indirect webdriver support through Selenium2library
 Tests are written in txt files
Experience with RF
Robot Framework
Robot Framework
Why not Behave?
 Pros
 BDD/ATDD is supported through Gherkin
 Libraries in Python
 Produces output in json and html
 Latest webdriver library supported
 More cucumber-like, better than RF in keyword logic
 Cons
 Page Object is not supported out-of-the-box
 Building custom framework layer required
 Only basic usage tutorials are available
Behave
Behave
Why not some fancy JS Framework?
Node.js + protractor.js + webdriver.js
 Pros
 BDD/ATDD is supported through Gherkin in cucumber.js
 Page-object through protractor.js
 Fresh and buzzy
 Robustly works with angular applications
 Output in html and json
 Cons
 Strong knowledge of JS required
 Only some basic tutorials available
 Immature frameworks, too many of them
 Has a high-entry point, more optimized for e2e testing
JavaScript Frameworks
JavaScript Frameworks
JavaScript Frameworks
Why
Ruby/Cucumber/PageObje
ct/Watir?
 Pros
 Full support of Cucumber
 Advanced Page-Object framework as a gem
 Rspec makes mocking and assertion more
advanced
 Excellence of both watir and webdriver
 Nice book fromJeff Morgan – “Cucumber and
Cheese”
 Cons
 Can be a separate language stack
 Learn other ruby gems for things like mysql, ssh and
so on
Advantages of Watir
 No xpath
 No Selenium IDE
 The power or Ruby
 Rich API
Page-object gem for Ruby
 https://github.com/cheezy/page-object
 Assists in creating flexible page-objects for testing
browser based applications
 Facilitates creation of abstraction layers in the
tests and makes decoupling easy
 Provides simple API interface to the elements on
a page
Page-object gem for Ruby
 Works with both watir-webdriver and selenium-
webdriver
 Robust way of dealing with Ajax Calls
 A clean way of handling JavaScripts pop-ups
 A simple way of dealing with Frames and iFrames
 Supports most HTML elements
Page Object
Define new page object
Add some methods, let’s say for login page
Creating Page Object
It is possible to create higher level methods that
hide implementation details even further
So usage of the page would become
Page Object Elements
 Button
 Cell
 Checkbox
 Div
 FileField
ttps://github.com/cheezy/page-object/wiki/Elements
 Form
 H1, H2, H3, H4, H5, H6
 Hidden Field
 Image
 Link
Page Object Elements
ttps://github.com/cheezy/page-object/wiki/Elements
 ListItem
 OrderedList
 Paragraph
 RadioButton
 SelectList (Dropdown)
 Span
 Table
 TableCell
 TextArea/TextField
 UnorderedList
Hooks
 Scenario hooks
 Before
 After
 Around
 Step hooks
 Tagged hooks
 Global hooks
 AfterConfiguration
Hooks
Before and After hooks
Tagging
 You can use tags to mark your scenarios
 Some tags are user for hooks
 There could be many tags for one scenario
 Effective execution of needed test scenarios
Tagging
Scenario vs. Scenario Outline
 Use different values instead of multiplying scenarios
 Allows to more concisely express the example through
the use of placeholders
 Scenario Outline steps provide a template which is
never directly run
 Problematic for some cucumber Reporting plug-ins in
Jenkins
Scenario vs. Scenario Outline
Advanced element usage
File Upload (steps and step definitions)
Advanced element usage
File Upload (function)
Advanced element usage
Looping through file links
Advanced features: iFrame, inFrame
Advanced features: iFrame, inFrame
Advanced features: JS Pop-ups
Alert, Confirm, Prompt
Continuous Integration with
Jenkins
 RVM plugin for executing tests in RVM env
 Cucumber-reports or Cucumber Test Result Plugin
for reporting
 Xvfb plugin for running tests headless
 Build With Parameters for manual execution using
different param
Continuous Integration with
Jenkins
Continuous Integration with
Jenkins
Questions? Ideas? Follow-up?
• Twitter @strazhnyk
• Skype ruslanstrazhnyk
• Email strazhnyk@gmail.com
• LinkedIn ruslanstrazhnyk

More Related Content

What's hot

BDD in Java using Cucumber
BDD in Java using CucumberBDD in Java using Cucumber
BDD in Java using Cucumberslavkurochkin
 
Better End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using ProtractorBetter End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using ProtractorKasun Kodagoda
 
watir-webdriver
watir-webdriverwatir-webdriver
watir-webdriverAmit DEWAN
 
Automated testing with Drupal
Automated testing with DrupalAutomated testing with Drupal
Automated testing with DrupalPromet Source
 
SQL Server - CLR integration
SQL Server - CLR integrationSQL Server - CLR integration
SQL Server - CLR integrationPeter Gfader
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Hong Tat Yew
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeColdFusionConference
 
Protractor for angularJS
Protractor for angularJSProtractor for angularJS
Protractor for angularJSKrishna Kumar
 
Automation Testing
Automation TestingAutomation Testing
Automation TestingRomSoft SRL
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScriptSimon Guest
 
Testing desktop apps with selenium
Testing desktop apps with seleniumTesting desktop apps with selenium
Testing desktop apps with seleniumFilip Braun
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to ProtractorFlorian Fesseler
 
BDD / cucumber /Capybara
BDD / cucumber /CapybaraBDD / cucumber /Capybara
BDD / cucumber /CapybaraShraddhaSF
 
JavaScript Testing VIA Selenium
JavaScript Testing VIA SeleniumJavaScript Testing VIA Selenium
JavaScript Testing VIA SeleniumAdam Christian
 
AngularJS and Protractor
AngularJS and ProtractorAngularJS and Protractor
AngularJS and ProtractorFilipe Falcão
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescueMarko Heijnen
 

What's hot (20)

Protractor overview
Protractor overviewProtractor overview
Protractor overview
 
BDD in Java using Cucumber
BDD in Java using CucumberBDD in Java using Cucumber
BDD in Java using Cucumber
 
Better End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using ProtractorBetter End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using Protractor
 
watir-webdriver
watir-webdriverwatir-webdriver
watir-webdriver
 
Automated testing with Drupal
Automated testing with DrupalAutomated testing with Drupal
Automated testing with Drupal
 
SQL Server - CLR integration
SQL Server - CLR integrationSQL Server - CLR integration
SQL Server - CLR integration
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)
 
Spring boot
Spring bootSpring boot
Spring boot
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
 
Protractor for angularJS
Protractor for angularJSProtractor for angularJS
Protractor for angularJS
 
Automation Testing
Automation TestingAutomation Testing
Automation Testing
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScript
 
Testing desktop apps with selenium
Testing desktop apps with seleniumTesting desktop apps with selenium
Testing desktop apps with selenium
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
 
BDD / cucumber /Capybara
BDD / cucumber /CapybaraBDD / cucumber /Capybara
BDD / cucumber /Capybara
 
JavaScript Testing VIA Selenium
JavaScript Testing VIA SeleniumJavaScript Testing VIA Selenium
JavaScript Testing VIA Selenium
 
Xke spring boot
Xke spring bootXke spring boot
Xke spring boot
 
AngularJS and Protractor
AngularJS and ProtractorAngularJS and Protractor
AngularJS and Protractor
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescue
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 

Viewers also liked

Teaching Automation. How big companies do it.
Teaching Automation. How big companies do it.Teaching Automation. How big companies do it.
Teaching Automation. How big companies do it.Vitali Shulha
 
Practical continuous quality gates for development process
Practical continuous quality gates for development processPractical continuous quality gates for development process
Practical continuous quality gates for development processAndrii Soldatenko
 
How to level-up your Selenium tests with Visual Testing #SeleniumCamp
How to level-up your Selenium tests with Visual Testing #SeleniumCampHow to level-up your Selenium tests with Visual Testing #SeleniumCamp
How to level-up your Selenium tests with Visual Testing #SeleniumCampmoshemilman
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...KMS Technology
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)Dave Haeffner
 
Selenium Tips & Tricks
Selenium Tips & TricksSelenium Tips & Tricks
Selenium Tips & TricksDave Haeffner
 
Roman iovlev battle - JDI vs Selenide - Selenium Camp
Roman iovlev battle - JDI vs Selenide - Selenium CampRoman iovlev battle - JDI vs Selenide - Selenium Camp
Roman iovlev battle - JDI vs Selenide - Selenium CampРоман Иовлев
 

Viewers also liked (7)

Teaching Automation. How big companies do it.
Teaching Automation. How big companies do it.Teaching Automation. How big companies do it.
Teaching Automation. How big companies do it.
 
Practical continuous quality gates for development process
Practical continuous quality gates for development processPractical continuous quality gates for development process
Practical continuous quality gates for development process
 
How to level-up your Selenium tests with Visual Testing #SeleniumCamp
How to level-up your Selenium tests with Visual Testing #SeleniumCampHow to level-up your Selenium tests with Visual Testing #SeleniumCamp
How to level-up your Selenium tests with Visual Testing #SeleniumCamp
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
Selenium Tips & Tricks
Selenium Tips & TricksSelenium Tips & Tricks
Selenium Tips & Tricks
 
Roman iovlev battle - JDI vs Selenide - Selenium Camp
Roman iovlev battle - JDI vs Selenide - Selenium CampRoman iovlev battle - JDI vs Selenide - Selenium Camp
Roman iovlev battle - JDI vs Selenide - Selenium Camp
 

Similar to Watir Cucumber Web UI Automation

Robot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs IntegrationRobot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs IntegrationSauce Labs
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullySpringPeople
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)Sauce Labs
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium SuccessfullyDave Haeffner
 
Technology Stack Discussion
Technology Stack DiscussionTechnology Stack Discussion
Technology Stack DiscussionZaiyang Li
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRBuilding Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRfunkatron
 
Introduction to Seam Applications
Introduction to Seam ApplicationsIntroduction to Seam Applications
Introduction to Seam Applicationsnuwanrg
 
Introduction to seam_applications_formated
Introduction to seam_applications_formatedIntroduction to seam_applications_formated
Introduction to seam_applications_formatednuwanrg
 
Introduction to seam_applications_formated
Introduction to seam_applications_formatedIntroduction to seam_applications_formated
Introduction to seam_applications_formatednuwanrg
 
Intro to Azure Static Web Apps
Intro to Azure Static Web AppsIntro to Azure Static Web Apps
Intro to Azure Static Web AppsMoaid Hathot
 
Acceptance Testing of Web UI
Acceptance Testing of Web UIAcceptance Testing of Web UI
Acceptance Testing of Web UIVladimir Tsukur
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupDave Haeffner
 
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Ondřej Machulda
 
Node Web Development 2nd Edition: Chapter1 About Node
Node Web Development 2nd Edition: Chapter1 About NodeNode Web Development 2nd Edition: Chapter1 About Node
Node Web Development 2nd Edition: Chapter1 About NodeRick Chang
 
Zepto and the rise of the JavaScript Micro-Frameworks
Zepto and the rise of the JavaScript Micro-FrameworksZepto and the rise of the JavaScript Micro-Frameworks
Zepto and the rise of the JavaScript Micro-FrameworksThomas Fuchs
 

Similar to Watir Cucumber Web UI Automation (20)

Robot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs IntegrationRobot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs Integration
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
 
Technology Stack Discussion
Technology Stack DiscussionTechnology Stack Discussion
Technology Stack Discussion
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRBuilding Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIR
 
Testing In Java
Testing In JavaTesting In Java
Testing In Java
 
Testing In Java4278
Testing In Java4278Testing In Java4278
Testing In Java4278
 
Story line
Story lineStory line
Story line
 
Introduction to Seam Applications
Introduction to Seam ApplicationsIntroduction to Seam Applications
Introduction to Seam Applications
 
Introduction to seam_applications_formated
Introduction to seam_applications_formatedIntroduction to seam_applications_formated
Introduction to seam_applications_formated
 
Introduction to seam_applications_formated
Introduction to seam_applications_formatedIntroduction to seam_applications_formated
Introduction to seam_applications_formated
 
Intro to Azure Static Web Apps
Intro to Azure Static Web AppsIntro to Azure Static Web Apps
Intro to Azure Static Web Apps
 
Acceptance Testing of Web UI
Acceptance Testing of Web UIAcceptance Testing of Web UI
Acceptance Testing of Web UI
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
 
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Node Web Development 2nd Edition: Chapter1 About Node
Node Web Development 2nd Edition: Chapter1 About NodeNode Web Development 2nd Edition: Chapter1 About Node
Node Web Development 2nd Edition: Chapter1 About Node
 
Zepto and the rise of the JavaScript Micro-Frameworks
Zepto and the rise of the JavaScript Micro-FrameworksZepto and the rise of the JavaScript Micro-Frameworks
Zepto and the rise of the JavaScript Micro-Frameworks
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Watir Cucumber Web UI Automation

  • 1. Making Watir and Cucumber an efficient tool for Web UI Automation Ruslan Strazhnyk nCryptedCloud
  • 2. About Me Ruslan Strazhnyk  Rich experience in creating Test Automation Frameworks - Front-end, Back-end, API, Load Testing  Languages: Ruby, Python, Java, JS  Technologies: Selenium, REST, CI, Jenkins, Jmeter
  • 4. Why Not Robot Framework?  Pros  Similar to BDD/ATDD test writing  Page Object implemented through Selenium2library plugin  Possible to write extensions in Python  Produces output in html  Cons  Requires building own framework (with extensions)  Requires learning RF own language for writing test scenarios  Indirect webdriver support through Selenium2library  Tests are written in txt files
  • 8. Why not Behave?  Pros  BDD/ATDD is supported through Gherkin  Libraries in Python  Produces output in json and html  Latest webdriver library supported  More cucumber-like, better than RF in keyword logic  Cons  Page Object is not supported out-of-the-box  Building custom framework layer required  Only basic usage tutorials are available
  • 11. Why not some fancy JS Framework? Node.js + protractor.js + webdriver.js  Pros  BDD/ATDD is supported through Gherkin in cucumber.js  Page-object through protractor.js  Fresh and buzzy  Robustly works with angular applications  Output in html and json  Cons  Strong knowledge of JS required  Only some basic tutorials available  Immature frameworks, too many of them  Has a high-entry point, more optimized for e2e testing
  • 15. Why Ruby/Cucumber/PageObje ct/Watir?  Pros  Full support of Cucumber  Advanced Page-Object framework as a gem  Rspec makes mocking and assertion more advanced  Excellence of both watir and webdriver  Nice book fromJeff Morgan – “Cucumber and Cheese”  Cons  Can be a separate language stack  Learn other ruby gems for things like mysql, ssh and so on
  • 16. Advantages of Watir  No xpath  No Selenium IDE  The power or Ruby  Rich API
  • 17. Page-object gem for Ruby  https://github.com/cheezy/page-object  Assists in creating flexible page-objects for testing browser based applications  Facilitates creation of abstraction layers in the tests and makes decoupling easy  Provides simple API interface to the elements on a page
  • 18. Page-object gem for Ruby  Works with both watir-webdriver and selenium- webdriver  Robust way of dealing with Ajax Calls  A clean way of handling JavaScripts pop-ups  A simple way of dealing with Frames and iFrames  Supports most HTML elements
  • 19. Page Object Define new page object Add some methods, let’s say for login page
  • 20. Creating Page Object It is possible to create higher level methods that hide implementation details even further So usage of the page would become
  • 21. Page Object Elements  Button  Cell  Checkbox  Div  FileField ttps://github.com/cheezy/page-object/wiki/Elements  Form  H1, H2, H3, H4, H5, H6  Hidden Field  Image  Link
  • 22. Page Object Elements ttps://github.com/cheezy/page-object/wiki/Elements  ListItem  OrderedList  Paragraph  RadioButton  SelectList (Dropdown)  Span  Table  TableCell  TextArea/TextField  UnorderedList
  • 23. Hooks  Scenario hooks  Before  After  Around  Step hooks  Tagged hooks  Global hooks  AfterConfiguration
  • 25. Tagging  You can use tags to mark your scenarios  Some tags are user for hooks  There could be many tags for one scenario  Effective execution of needed test scenarios
  • 27. Scenario vs. Scenario Outline  Use different values instead of multiplying scenarios  Allows to more concisely express the example through the use of placeholders  Scenario Outline steps provide a template which is never directly run  Problematic for some cucumber Reporting plug-ins in Jenkins
  • 29. Advanced element usage File Upload (steps and step definitions)
  • 30. Advanced element usage File Upload (function)
  • 31. Advanced element usage Looping through file links
  • 34. Advanced features: JS Pop-ups Alert, Confirm, Prompt
  • 35. Continuous Integration with Jenkins  RVM plugin for executing tests in RVM env  Cucumber-reports or Cucumber Test Result Plugin for reporting  Xvfb plugin for running tests headless  Build With Parameters for manual execution using different param
  • 38. Questions? Ideas? Follow-up? • Twitter @strazhnyk • Skype ruslanstrazhnyk • Email strazhnyk@gmail.com • LinkedIn ruslanstrazhnyk