SlideShare a Scribd company logo
1 of 21
Better End-to-End Testing With
Page Object Model
Using Protractor
Kasun Kodagoda | Team Finale
Trainee Software Engineer | 99X Technology
Overview
ā€¢ Protractor
ā€¢ What is it?
ā€¢ Getting Up and Running
ā€¢ Basic Requirements
ā€¢ Page Objects
ā€¢ What is it?
ā€¢ Why Use it?
ā€¢ A Deeper Dive..
ā€¢ Demo
Protractor
What Is It?
ā€œProtractor is an end-to-end test framework for AngularJS
applications. Protractor runs tests against your application running in
a real browser, interacting with it as a user wouldā€
Source: Official Protractor Website
What Is It?
ā€¢ Combination of powerful technologies and tools for testing
Node.js, Selenium, Jasmine, WebDriver, Cucumber, Mocha
ā€¢ Wrapper for Selenium, made for Angular.js
ā€¢ Uses angular specific constructs for capturing elements
Model, bindings, repeaters etc.
ā€¢ Runs on real browsers as well as headless browsers
Get Up And Running..
ā€¢ Install Node.js
ā€¢ Install Protractor
npm install ā€“g protractor
ā€¢ Install WebDriver
webdriver-manager update
ā€¢ Start WebDriver
webdriver-manager start // do this before you run the tests
Basic Requirements
ā€¢ Youā€™ll need 2 basic files to start,
ā€¢ A Test/Spec file
Contains the element references, assertions
ā€¢ The Configuration File
Contains the configuration options for running protractor
ā€¢ Use your preferred test framework to write tests
ā€¢ Jasmine ā€“ Fully Supported
ā€¢ Mocha ā€“ Limited Support
ā€¢ Cucumber ā€“ Limited Support
Sample Config File
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: {
'browserName': 'chrome'
},
specs: [
'specs/*Spec.js'
],
jasmineNodeOpts: {
showColors: true
}
};
Sample Test
describe('Test Home Page', function () {
it("Should display the text typed in to the input field.", function () {
browser.get('http://localhost:8080/#/');
// Type in a value to input field
var textInput = element(by.model('sampleInput'));
textInput.sendKeys('The KVK Blog');
// Check if the same value is displayed
var displayField = element(by.binding('sampleInput'));
expect(displayField.getText()).toEqual('The KVK Blog');
});
});
Conventional UI Tests
ā€¢ Element references are inside tests
ā€¢ Test are cluttered
ā€¢ Less readable
ā€¢ Very fragile
Page Objects Pattern
What Is A Page Object?
ā€œA page object is an object-oriented class that serves as an interface to
a page of your AUTā€
ā€¢ Wraps a HTML page/fragment
ā€¢ Provide Application Specific API
ā€¢ Hides the underlying complexity
ā€¢ Used to manipulate elements on page
Why Use Page Objects?
ā€¢ Reduce Code Duplication
ā€¢ Reusable Page Objects
ā€¢ More Readable Tests
ā€¢ Less Vulnerable to Break
ā€¢ More Maintainable Tests
Especially in Agile Based Projects
A Deeper Diveā€¦
Return Types
ā€¢ Methods in Page Objects should return fundamental types
Strings, Dates, Booleans
ā€¢ It can return other complex types as well
Promises, other Page Objects
A Deeper Diveā€¦
ā€¢ Method names can be much closer to what the user is actually doing.
var inputField = element(by.model(ā€˜first_nameā€™);
inputField.sendKeys(ā€˜Kasunā€™);
Or
element(by.model(ā€˜first_nameā€™)).sendKeys(ā€˜Kasunā€™);
Instead We can use
somePage.addFirstName(ā€˜Kasunā€™);
A Deeper Diveā€¦
The Dilemma
ā€¢ Use of assertions
ā€¢ Include Assertions inside Page Objects
ā€¢ Not Include Assertions inside Page Objects
ā€¢ Itā€™s Subjective and the Choice is yoursā€¦
A Deeper Diveā€¦
No Assertions in Page Objects for Us. Why??
ā€¢ Separation of Responsibility
ā€¢ Page Objects should only provide access to HTML pages
ā€¢ Page Objects become longer
A Deeper Diveā€¦
What We Believe
ā€œIf what we test changes, The assertions and the tests should changeā€
ā€œIf the HTML page changes, The Page Object should changeā€
This,
ā€¢ Allows us to easily modify the tests/specs when functionality or
underlying HTML pages change overtime
http://goo.gl/MFNy9C
https://github.com/kasunkv/e2e-sample-app.git
Demo
You Have NO Questionsā€¦
Right?... ;)
Thank You
For Not Throwing Rocks At Me ^_^

More Related Content

What's hot

An Introduction to AngularJS End to End Testing using Protractor
An Introduction to AngularJS End to End Testing using ProtractorAn Introduction to AngularJS End to End Testing using Protractor
An Introduction to AngularJS End to End Testing using ProtractorCubet Techno Labs
Ā 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScriptSimon Guest
Ā 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScriptSimon Guest
Ā 
Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Andrew Eisenberg
Ā 
Angular UI Testing with Protractor
Angular UI Testing with ProtractorAngular UI Testing with Protractor
Angular UI Testing with ProtractorAndrew Eisenberg
Ā 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to ProtractorFlorian Fesseler
Ā 
Jellyfish, JSCONF 2011
Jellyfish, JSCONF 2011Jellyfish, JSCONF 2011
Jellyfish, JSCONF 2011Adam Christian
Ā 
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
Ā 
Automation using Javascript
Automation using JavascriptAutomation using Javascript
Automation using Javascriptkhanhdang1214
Ā 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternSargis Sargsyan
Ā 
Front-End Testing: Demystified
Front-End Testing: DemystifiedFront-End Testing: Demystified
Front-End Testing: DemystifiedSeth McLaughlin
Ā 
Automated Testing in Angular Slides
Automated Testing in Angular SlidesAutomated Testing in Angular Slides
Automated Testing in Angular SlidesJim Lynch
Ā 
Testing Code.org's Interactive CS Curriculum
Testing Code.org's Interactive CS CurriculumTesting Code.org's Interactive CS Curriculum
Testing Code.org's Interactive CS CurriculumBrian Jordan
Ā 
Join the darkside: Selenium testing with Nightwatch.js
Join the darkside: Selenium testing with Nightwatch.jsJoin the darkside: Selenium testing with Nightwatch.js
Join the darkside: Selenium testing with Nightwatch.jsSeth McLaughlin
Ā 
Testing nightwatch, by David Torroija
Testing nightwatch, by David TorroijaTesting nightwatch, by David Torroija
Testing nightwatch, by David TorroijaDavid Torroija
Ā 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, SuccessfullySauce Labs
Ā 
Automated Smoke Tests with Protractor
Automated Smoke Tests with ProtractorAutomated Smoke Tests with Protractor
Automated Smoke Tests with ProtractoršŸŒ± Dale Spoonemore
Ā 
Intro to Service Worker API and its use cases
Intro to Service Worker API and its use casesIntro to Service Worker API and its use cases
Intro to Service Worker API and its use casessatejsahu
Ā 
Selenium with protractor
Selenium with protractorSelenium with protractor
Selenium with protractorBOGA HARIKRISHNA
Ā 

What's hot (20)

An Introduction to AngularJS End to End Testing using Protractor
An Introduction to AngularJS End to End Testing using ProtractorAn Introduction to AngularJS End to End Testing using Protractor
An Introduction to AngularJS End to End Testing using Protractor
Ā 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScript
Ā 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScript
Ā 
Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015
Ā 
Angular UI Testing with Protractor
Angular UI Testing with ProtractorAngular UI Testing with Protractor
Angular UI Testing with Protractor
Ā 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
Ā 
Jellyfish, JSCONF 2011
Jellyfish, JSCONF 2011Jellyfish, JSCONF 2011
Jellyfish, JSCONF 2011
Ā 
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
Ā 
Automation using Javascript
Automation using JavascriptAutomation using Javascript
Automation using Javascript
Ā 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component Pattern
Ā 
Front-End Testing: Demystified
Front-End Testing: DemystifiedFront-End Testing: Demystified
Front-End Testing: Demystified
Ā 
Automated Testing in Angular Slides
Automated Testing in Angular SlidesAutomated Testing in Angular Slides
Automated Testing in Angular Slides
Ā 
Testing Code.org's Interactive CS Curriculum
Testing Code.org's Interactive CS CurriculumTesting Code.org's Interactive CS Curriculum
Testing Code.org's Interactive CS Curriculum
Ā 
Join the darkside: Selenium testing with Nightwatch.js
Join the darkside: Selenium testing with Nightwatch.jsJoin the darkside: Selenium testing with Nightwatch.js
Join the darkside: Selenium testing with Nightwatch.js
Ā 
Testing nightwatch, by David Torroija
Testing nightwatch, by David TorroijaTesting nightwatch, by David Torroija
Testing nightwatch, by David Torroija
Ā 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, Successfully
Ā 
Selenium for Jobseekers
Selenium for JobseekersSelenium for Jobseekers
Selenium for Jobseekers
Ā 
Automated Smoke Tests with Protractor
Automated Smoke Tests with ProtractorAutomated Smoke Tests with Protractor
Automated Smoke Tests with Protractor
Ā 
Intro to Service Worker API and its use cases
Intro to Service Worker API and its use casesIntro to Service Worker API and its use cases
Intro to Service Worker API and its use cases
Ā 
Selenium with protractor
Selenium with protractorSelenium with protractor
Selenium with protractor
Ā 

Viewers also liked

Protractor: Tips & Tricks
Protractor: Tips & TricksProtractor: Tips & Tricks
Protractor: Tips & TricksSergey Bolshchikov
Ā 
Sharing the pain using Protractor
Sharing the pain using ProtractorSharing the pain using Protractor
Sharing the pain using ProtractorAnand Bagmar
Ā 
Test Data - Food for your Test Automation Framework
Test Data - Food for your Test Automation FrameworkTest Data - Food for your Test Automation Framework
Test Data - Food for your Test Automation FrameworkAnand Bagmar
Ā 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to ProtractorJie-Wei Wu
Ā 
Intro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJSIntro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJSJim Lynch
Ā 
Testing Backbone applications with Jasmine
Testing Backbone applications with JasmineTesting Backbone applications with Jasmine
Testing Backbone applications with JasmineLeon van der Grient
Ā 
Jasmine framework
Jasmine frameworkJasmine framework
Jasmine frameworkVishwanath KC
Ā 
ŠøŠ½Ń‚ŠµŃ€Š½ŠµŃ‚ Š² сŠ¾Ń†ŠøŠ¾Š»Š¾Š³ŠøŠø Š²Š°Š¶Š½ŠµŠ¹ŃˆŠøŠµ ŠøŠ½Ń„Š¾Ń€Š¼Š°Ń†ŠøŠ¾Š½Š½Ń‹Šµ сŠ°Š¹Ń‚Ń‹ Š“Š°Š“Š°Š“Š°Š“Š°Š“)))
ŠøŠ½Ń‚ŠµŃ€Š½ŠµŃ‚ Š² сŠ¾Ń†ŠøŠ¾Š»Š¾Š³ŠøŠø   Š²Š°Š¶Š½ŠµŠ¹ŃˆŠøŠµ ŠøŠ½Ń„Š¾Ń€Š¼Š°Ń†ŠøŠ¾Š½Š½Ń‹Šµ сŠ°Š¹Ń‚Ń‹ Š“Š°Š“Š°Š“Š°Š“Š°Š“)))ŠøŠ½Ń‚ŠµŃ€Š½ŠµŃ‚ Š² сŠ¾Ń†ŠøŠ¾Š»Š¾Š³ŠøŠø   Š²Š°Š¶Š½ŠµŠ¹ŃˆŠøŠµ ŠøŠ½Ń„Š¾Ń€Š¼Š°Ń†ŠøŠ¾Š½Š½Ń‹Šµ сŠ°Š¹Ń‚Ń‹ Š“Š°Š“Š°Š“Š°Š“Š°Š“)))
ŠøŠ½Ń‚ŠµŃ€Š½ŠµŃ‚ Š² сŠ¾Ń†ŠøŠ¾Š»Š¾Š³ŠøŠø Š²Š°Š¶Š½ŠµŠ¹ŃˆŠøŠµ ŠøŠ½Ń„Š¾Ń€Š¼Š°Ń†ŠøŠ¾Š½Š½Ń‹Šµ сŠ°Š¹Ń‚Ń‹ Š“Š°Š“Š°Š“Š°Š“Š°Š“)))faqMEN
Ā 
Automated Acceptance Testing Example
Automated Acceptance Testing ExampleAutomated Acceptance Testing Example
Automated Acceptance Testing ExampleHani Massoud
Ā 
The sweet smell of jasmine for testing JavaScript
The sweet smell of jasmine for testing JavaScriptThe sweet smell of jasmine for testing JavaScript
The sweet smell of jasmine for testing JavaScriptEmma Armstrong
Ā 
Advanced Jasmine
Advanced JasmineAdvanced Jasmine
Advanced Jasminejbellsey
Ā 
Testing Angular 2 Applications - HTML5 Denver 2016
Testing Angular 2 Applications - HTML5 Denver 2016Testing Angular 2 Applications - HTML5 Denver 2016
Testing Angular 2 Applications - HTML5 Denver 2016Matt Raible
Ā 
20150128 angular js_headless_testing
20150128 angular js_headless_testing20150128 angular js_headless_testing
20150128 angular js_headless_testingBenjamin Neu
Ā 
Thinking outside the box (SOX)
Thinking outside the box (SOX)Thinking outside the box (SOX)
Thinking outside the box (SOX)Vladimir Matviychuk
Ā 
10 Tips For Serverless Backends With NodeJS and AWS Lambda
10 Tips For Serverless Backends With NodeJS and AWS Lambda10 Tips For Serverless Backends With NodeJS and AWS Lambda
10 Tips For Serverless Backends With NodeJS and AWS LambdaJim Lynch
Ā 
Presentation_Protractor
Presentation_ProtractorPresentation_Protractor
Presentation_ProtractorUmesh Randhe
Ā 
ProtractorJS for automated testing of Angular 1.x/2.x applications
ProtractorJS for automated testing of Angular 1.x/2.x applicationsProtractorJS for automated testing of Angular 1.x/2.x applications
ProtractorJS for automated testing of Angular 1.x/2.x applicationsBinary Studio
Ā 
Protractor powerpoint
Protractor powerpointProtractor powerpoint
Protractor powerpointlindarousselle
Ā 

Viewers also liked (19)

Protractor: Tips & Tricks
Protractor: Tips & TricksProtractor: Tips & Tricks
Protractor: Tips & Tricks
Ā 
Sharing the pain using Protractor
Sharing the pain using ProtractorSharing the pain using Protractor
Sharing the pain using Protractor
Ā 
Test Data - Food for your Test Automation Framework
Test Data - Food for your Test Automation FrameworkTest Data - Food for your Test Automation Framework
Test Data - Food for your Test Automation Framework
Ā 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
Ā 
Intro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJSIntro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJS
Ā 
Testing Backbone applications with Jasmine
Testing Backbone applications with JasmineTesting Backbone applications with Jasmine
Testing Backbone applications with Jasmine
Ā 
Jasmine framework
Jasmine frameworkJasmine framework
Jasmine framework
Ā 
ŠøŠ½Ń‚ŠµŃ€Š½ŠµŃ‚ Š² сŠ¾Ń†ŠøŠ¾Š»Š¾Š³ŠøŠø Š²Š°Š¶Š½ŠµŠ¹ŃˆŠøŠµ ŠøŠ½Ń„Š¾Ń€Š¼Š°Ń†ŠøŠ¾Š½Š½Ń‹Šµ сŠ°Š¹Ń‚Ń‹ Š“Š°Š“Š°Š“Š°Š“Š°Š“)))
ŠøŠ½Ń‚ŠµŃ€Š½ŠµŃ‚ Š² сŠ¾Ń†ŠøŠ¾Š»Š¾Š³ŠøŠø   Š²Š°Š¶Š½ŠµŠ¹ŃˆŠøŠµ ŠøŠ½Ń„Š¾Ń€Š¼Š°Ń†ŠøŠ¾Š½Š½Ń‹Šµ сŠ°Š¹Ń‚Ń‹ Š“Š°Š“Š°Š“Š°Š“Š°Š“)))ŠøŠ½Ń‚ŠµŃ€Š½ŠµŃ‚ Š² сŠ¾Ń†ŠøŠ¾Š»Š¾Š³ŠøŠø   Š²Š°Š¶Š½ŠµŠ¹ŃˆŠøŠµ ŠøŠ½Ń„Š¾Ń€Š¼Š°Ń†ŠøŠ¾Š½Š½Ń‹Šµ сŠ°Š¹Ń‚Ń‹ Š“Š°Š“Š°Š“Š°Š“Š°Š“)))
ŠøŠ½Ń‚ŠµŃ€Š½ŠµŃ‚ Š² сŠ¾Ń†ŠøŠ¾Š»Š¾Š³ŠøŠø Š²Š°Š¶Š½ŠµŠ¹ŃˆŠøŠµ ŠøŠ½Ń„Š¾Ń€Š¼Š°Ń†ŠøŠ¾Š½Š½Ń‹Šµ сŠ°Š¹Ń‚Ń‹ Š“Š°Š“Š°Š“Š°Š“Š°Š“)))
Ā 
Automated Acceptance Testing Example
Automated Acceptance Testing ExampleAutomated Acceptance Testing Example
Automated Acceptance Testing Example
Ā 
The sweet smell of jasmine for testing JavaScript
The sweet smell of jasmine for testing JavaScriptThe sweet smell of jasmine for testing JavaScript
The sweet smell of jasmine for testing JavaScript
Ā 
Advanced Jasmine
Advanced JasmineAdvanced Jasmine
Advanced Jasmine
Ā 
Testing Angular 2 Applications - HTML5 Denver 2016
Testing Angular 2 Applications - HTML5 Denver 2016Testing Angular 2 Applications - HTML5 Denver 2016
Testing Angular 2 Applications - HTML5 Denver 2016
Ā 
20150128 angular js_headless_testing
20150128 angular js_headless_testing20150128 angular js_headless_testing
20150128 angular js_headless_testing
Ā 
Thinking outside the box (SOX)
Thinking outside the box (SOX)Thinking outside the box (SOX)
Thinking outside the box (SOX)
Ā 
10 Tips For Serverless Backends With NodeJS and AWS Lambda
10 Tips For Serverless Backends With NodeJS and AWS Lambda10 Tips For Serverless Backends With NodeJS and AWS Lambda
10 Tips For Serverless Backends With NodeJS and AWS Lambda
Ā 
Angular Testing
Angular TestingAngular Testing
Angular Testing
Ā 
Presentation_Protractor
Presentation_ProtractorPresentation_Protractor
Presentation_Protractor
Ā 
ProtractorJS for automated testing of Angular 1.x/2.x applications
ProtractorJS for automated testing of Angular 1.x/2.x applicationsProtractorJS for automated testing of Angular 1.x/2.x applications
ProtractorJS for automated testing of Angular 1.x/2.x applications
Ā 
Protractor powerpoint
Protractor powerpointProtractor powerpoint
Protractor powerpoint
Ā 

Similar to Better End-to-End Testing with Page Objects Model using Protractor

DSL, Page Object and WebDriver ā€“ the path to reliable functional tests.pptx
DSL, Page Object and WebDriver ā€“ the path to reliable functional tests.pptxDSL, Page Object and WebDriver ā€“ the path to reliable functional tests.pptx
DSL, Page Object and WebDriver ā€“ the path to reliable functional tests.pptxMikalai Alimenkou
Ā 
DSL, Page Object Šø WebDriver ā€“ Šæуть Šŗ Š½Š°Š“ŠµŠ¶Š½Ń‹Š¼ фуŠ½ŠŗцŠøŠ¾Š½Š°Š»ŃŒŠ½Ń‹Š¼ тŠµŃŃ‚Š°Š¼
DSL, Page Object Šø WebDriver ā€“ Šæуть Šŗ Š½Š°Š“ŠµŠ¶Š½Ń‹Š¼ фуŠ½ŠŗцŠøŠ¾Š½Š°Š»ŃŒŠ½Ń‹Š¼ тŠµŃŃ‚Š°Š¼DSL, Page Object Šø WebDriver ā€“ Šæуть Šŗ Š½Š°Š“ŠµŠ¶Š½Ń‹Š¼ фуŠ½ŠŗцŠøŠ¾Š½Š°Š»ŃŒŠ½Ń‹Š¼ тŠµŃŃ‚Š°Š¼
DSL, Page Object Šø WebDriver ā€“ Šæуть Šŗ Š½Š°Š“ŠµŠ¶Š½Ń‹Š¼ фуŠ½ŠŗцŠøŠ¾Š½Š°Š»ŃŒŠ½Ń‹Š¼ тŠµŃŃ‚Š°Š¼SQALab
Ā 
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016Roy de Kleijn
Ā 
Mastering react with redux
Mastering react with reduxMastering react with redux
Mastering react with reduxGaurav Singh
Ā 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternSQALab
Ā 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day WorkshopShyam Seshadri
Ā 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Wojciech Seliga
Ā 
Quick start with AngularJS
Quick start with AngularJSQuick start with AngularJS
Quick start with AngularJSIuliia Baranova
Ā 
Become a Full Stack Web Developer (.NET) - Thisiswali
Become a Full Stack Web Developer (.NET) - ThisiswaliBecome a Full Stack Web Developer (.NET) - Thisiswali
Become a Full Stack Web Developer (.NET) - Thisiswalithisiswali
Ā 
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...Sargis Sargsyan
Ā 
Galen Framework - Responsive Design Automation
Galen Framework - Responsive Design AutomationGalen Framework - Responsive Design Automation
Galen Framework - Responsive Design AutomationVenkat Ramana Reddy Parine
Ā 
Selenium Online Training
Selenium  Online TrainingSelenium  Online Training
Selenium Online TrainingLearntek1
Ā 
Testing-Tools-Magnitia-Content.pdf
Testing-Tools-Magnitia-Content.pdfTesting-Tools-Magnitia-Content.pdf
Testing-Tools-Magnitia-Content.pdfAnanthReddy38
Ā 
Selenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdfSelenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdfAnanthReddy38
Ā 
Selenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdfSelenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdfAnanthReddy38
Ā 
Selenium Online Training
Selenium Online Training Selenium Online Training
Selenium Online Training Nagendra Kumar
Ā 
Angular patterns
Angular patternsAngular patterns
Angular patternsPremkumar M
Ā 
Kevin Whinnery: Write Better JavaScript
Kevin Whinnery: Write Better JavaScriptKevin Whinnery: Write Better JavaScript
Kevin Whinnery: Write Better JavaScriptAxway Appcelerator
Ā 

Similar to Better End-to-End Testing with Page Objects Model using Protractor (20)

DSL, Page Object and WebDriver ā€“ the path to reliable functional tests.pptx
DSL, Page Object and WebDriver ā€“ the path to reliable functional tests.pptxDSL, Page Object and WebDriver ā€“ the path to reliable functional tests.pptx
DSL, Page Object and WebDriver ā€“ the path to reliable functional tests.pptx
Ā 
DSL, Page Object Šø WebDriver ā€“ Šæуть Šŗ Š½Š°Š“ŠµŠ¶Š½Ń‹Š¼ фуŠ½ŠŗцŠøŠ¾Š½Š°Š»ŃŒŠ½Ń‹Š¼ тŠµŃŃ‚Š°Š¼
DSL, Page Object Šø WebDriver ā€“ Šæуть Šŗ Š½Š°Š“ŠµŠ¶Š½Ń‹Š¼ фуŠ½ŠŗцŠøŠ¾Š½Š°Š»ŃŒŠ½Ń‹Š¼ тŠµŃŃ‚Š°Š¼DSL, Page Object Šø WebDriver ā€“ Šæуть Šŗ Š½Š°Š“ŠµŠ¶Š½Ń‹Š¼ фуŠ½ŠŗцŠøŠ¾Š½Š°Š»ŃŒŠ½Ń‹Š¼ тŠµŃŃ‚Š°Š¼
DSL, Page Object Šø WebDriver ā€“ Šæуть Šŗ Š½Š°Š“ŠµŠ¶Š½Ń‹Š¼ фуŠ½ŠŗцŠøŠ¾Š½Š°Š»ŃŒŠ½Ń‹Š¼ тŠµŃŃ‚Š°Š¼
Ā 
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Ā 
Mastering react with redux
Mastering react with reduxMastering react with redux
Mastering react with redux
Ā 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component Pattern
Ā 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
Ā 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014
Ā 
Quick start with AngularJS
Quick start with AngularJSQuick start with AngularJS
Quick start with AngularJS
Ā 
Become a Full Stack Web Developer (.NET) - Thisiswali
Become a Full Stack Web Developer (.NET) - ThisiswaliBecome a Full Stack Web Developer (.NET) - Thisiswali
Become a Full Stack Web Developer (.NET) - Thisiswali
Ā 
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Ā 
Galen Framework - Responsive Design Automation
Galen Framework - Responsive Design AutomationGalen Framework - Responsive Design Automation
Galen Framework - Responsive Design Automation
Ā 
Galenframework
GalenframeworkGalenframework
Galenframework
Ā 
Galenframework
GalenframeworkGalenframework
Galenframework
Ā 
Selenium Online Training
Selenium  Online TrainingSelenium  Online Training
Selenium Online Training
Ā 
Testing-Tools-Magnitia-Content.pdf
Testing-Tools-Magnitia-Content.pdfTesting-Tools-Magnitia-Content.pdf
Testing-Tools-Magnitia-Content.pdf
Ā 
Selenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdfSelenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdf
Ā 
Selenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdfSelenium-with-Java-Course-Content-Magnitia.pdf
Selenium-with-Java-Course-Content-Magnitia.pdf
Ā 
Selenium Online Training
Selenium Online Training Selenium Online Training
Selenium Online Training
Ā 
Angular patterns
Angular patternsAngular patterns
Angular patterns
Ā 
Kevin Whinnery: Write Better JavaScript
Kevin Whinnery: Write Better JavaScriptKevin Whinnery: Write Better JavaScript
Kevin Whinnery: Write Better JavaScript
Ā 

More from Kasun Kodagoda

Using GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureUsing GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureKasun Kodagoda
Ā 
Feature Toggle for .Net Core Apps on Azure with Azure App Configuration Featu...
Feature Toggle for .Net Core Apps on Azure with Azure App Configuration Featu...Feature Toggle for .Net Core Apps on Azure with Azure App Configuration Featu...
Feature Toggle for .Net Core Apps on Azure with Azure App Configuration Featu...Kasun Kodagoda
Ā 
Get On Top of Azure Resource Security Using Secure DevOps Kit for Azure
Get On Top of Azure Resource Security Using Secure DevOps Kit for AzureGet On Top of Azure Resource Security Using Secure DevOps Kit for Azure
Get On Top of Azure Resource Security Using Secure DevOps Kit for AzureKasun Kodagoda
Ā 
Centralized Configuration Management for the Cloud with Azure App Configuration
Centralized Configuration Management for the Cloud with Azure App ConfigurationCentralized Configuration Management for the Cloud with Azure App Configuration
Centralized Configuration Management for the Cloud with Azure App ConfigurationKasun Kodagoda
Ā 
Serverless in the Azure World
Serverless in the Azure WorldServerless in the Azure World
Serverless in the Azure WorldKasun Kodagoda
Ā 
Role of Test Automation in Modern Software Delivery Pipelines
Role of Test Automation in Modern Software Delivery PipelinesRole of Test Automation in Modern Software Delivery Pipelines
Role of Test Automation in Modern Software Delivery PipelinesKasun Kodagoda
Ā 
Demystifying Azure Certifications
Demystifying Azure CertificationsDemystifying Azure Certifications
Demystifying Azure CertificationsKasun Kodagoda
Ā 
Good Bye Credentials in Code, Welcome Azure Managed Identities
Good Bye Credentials in Code, Welcome Azure Managed IdentitiesGood Bye Credentials in Code, Welcome Azure Managed Identities
Good Bye Credentials in Code, Welcome Azure Managed IdentitiesKasun Kodagoda
Ā 
DevOps: Why Should We Care?
DevOps: Why Should We Care?DevOps: Why Should We Care?
DevOps: Why Should We Care?Kasun Kodagoda
Ā 
Introduction to Microsoft Azure
Introduction to Microsoft AzureIntroduction to Microsoft Azure
Introduction to Microsoft AzureKasun Kodagoda
Ā 
Building Custom Visual Studio Team Service Build Tasks With VSTS DevOps Task SDK
Building Custom Visual Studio Team Service Build Tasks With VSTS DevOps Task SDKBuilding Custom Visual Studio Team Service Build Tasks With VSTS DevOps Task SDK
Building Custom Visual Studio Team Service Build Tasks With VSTS DevOps Task SDKKasun Kodagoda
Ā 
Building a Continuous Delivery Pipeline With Visual Studio
Building a Continuous Delivery Pipeline With Visual StudioBuilding a Continuous Delivery Pipeline With Visual Studio
Building a Continuous Delivery Pipeline With Visual StudioKasun Kodagoda
Ā 
Going Serverless with Azure Functions #1 - Introduction to Azure Functions
Going Serverless with Azure Functions #1 - Introduction to Azure FunctionsGoing Serverless with Azure Functions #1 - Introduction to Azure Functions
Going Serverless with Azure Functions #1 - Introduction to Azure FunctionsKasun Kodagoda
Ā 
Making Money with Technology
Making Money with TechnologyMaking Money with Technology
Making Money with TechnologyKasun Kodagoda
Ā 
Monetizing Windows Phone Apps
Monetizing Windows Phone AppsMonetizing Windows Phone Apps
Monetizing Windows Phone AppsKasun Kodagoda
Ā 

More from Kasun Kodagoda (15)

Using GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureUsing GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to Azure
Ā 
Feature Toggle for .Net Core Apps on Azure with Azure App Configuration Featu...
Feature Toggle for .Net Core Apps on Azure with Azure App Configuration Featu...Feature Toggle for .Net Core Apps on Azure with Azure App Configuration Featu...
Feature Toggle for .Net Core Apps on Azure with Azure App Configuration Featu...
Ā 
Get On Top of Azure Resource Security Using Secure DevOps Kit for Azure
Get On Top of Azure Resource Security Using Secure DevOps Kit for AzureGet On Top of Azure Resource Security Using Secure DevOps Kit for Azure
Get On Top of Azure Resource Security Using Secure DevOps Kit for Azure
Ā 
Centralized Configuration Management for the Cloud with Azure App Configuration
Centralized Configuration Management for the Cloud with Azure App ConfigurationCentralized Configuration Management for the Cloud with Azure App Configuration
Centralized Configuration Management for the Cloud with Azure App Configuration
Ā 
Serverless in the Azure World
Serverless in the Azure WorldServerless in the Azure World
Serverless in the Azure World
Ā 
Role of Test Automation in Modern Software Delivery Pipelines
Role of Test Automation in Modern Software Delivery PipelinesRole of Test Automation in Modern Software Delivery Pipelines
Role of Test Automation in Modern Software Delivery Pipelines
Ā 
Demystifying Azure Certifications
Demystifying Azure CertificationsDemystifying Azure Certifications
Demystifying Azure Certifications
Ā 
Good Bye Credentials in Code, Welcome Azure Managed Identities
Good Bye Credentials in Code, Welcome Azure Managed IdentitiesGood Bye Credentials in Code, Welcome Azure Managed Identities
Good Bye Credentials in Code, Welcome Azure Managed Identities
Ā 
DevOps: Why Should We Care?
DevOps: Why Should We Care?DevOps: Why Should We Care?
DevOps: Why Should We Care?
Ā 
Introduction to Microsoft Azure
Introduction to Microsoft AzureIntroduction to Microsoft Azure
Introduction to Microsoft Azure
Ā 
Building Custom Visual Studio Team Service Build Tasks With VSTS DevOps Task SDK
Building Custom Visual Studio Team Service Build Tasks With VSTS DevOps Task SDKBuilding Custom Visual Studio Team Service Build Tasks With VSTS DevOps Task SDK
Building Custom Visual Studio Team Service Build Tasks With VSTS DevOps Task SDK
Ā 
Building a Continuous Delivery Pipeline With Visual Studio
Building a Continuous Delivery Pipeline With Visual StudioBuilding a Continuous Delivery Pipeline With Visual Studio
Building a Continuous Delivery Pipeline With Visual Studio
Ā 
Going Serverless with Azure Functions #1 - Introduction to Azure Functions
Going Serverless with Azure Functions #1 - Introduction to Azure FunctionsGoing Serverless with Azure Functions #1 - Introduction to Azure Functions
Going Serverless with Azure Functions #1 - Introduction to Azure Functions
Ā 
Making Money with Technology
Making Money with TechnologyMaking Money with Technology
Making Money with Technology
Ā 
Monetizing Windows Phone Apps
Monetizing Windows Phone AppsMonetizing Windows Phone Apps
Monetizing Windows Phone Apps
Ā 

Recently uploaded

Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
Ā 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
Ā 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
Ā 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
Ā 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
Ā 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
Ā 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
Ā 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
Ā 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto PĆ©rez Alcolea
Ā 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
Ā 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy LĆ³pez
Ā 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
Ā 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
Ā 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
Ā 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
Ā 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
Ā 
Post Quantum Cryptography ā€“ The Impact on Identity
Post Quantum Cryptography ā€“ The Impact on IdentityPost Quantum Cryptography ā€“ The Impact on Identity
Post Quantum Cryptography ā€“ The Impact on Identityteam-WIBU
Ā 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
Ā 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
Ā 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
Ā 

Recently uploaded (20)

Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Ā 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Ā 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
Ā 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Ā 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
Ā 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Ā 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
Ā 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Ā 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
Ā 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
Ā 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Ā 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
Ā 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
Ā 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
Ā 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
Ā 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Ā 
Post Quantum Cryptography ā€“ The Impact on Identity
Post Quantum Cryptography ā€“ The Impact on IdentityPost Quantum Cryptography ā€“ The Impact on Identity
Post Quantum Cryptography ā€“ The Impact on Identity
Ā 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
Ā 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
Ā 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
Ā 

Better End-to-End Testing with Page Objects Model using Protractor

  • 1. Better End-to-End Testing With Page Object Model Using Protractor Kasun Kodagoda | Team Finale Trainee Software Engineer | 99X Technology
  • 2. Overview ā€¢ Protractor ā€¢ What is it? ā€¢ Getting Up and Running ā€¢ Basic Requirements ā€¢ Page Objects ā€¢ What is it? ā€¢ Why Use it? ā€¢ A Deeper Dive.. ā€¢ Demo
  • 4. What Is It? ā€œProtractor is an end-to-end test framework for AngularJS applications. Protractor runs tests against your application running in a real browser, interacting with it as a user wouldā€ Source: Official Protractor Website
  • 5. What Is It? ā€¢ Combination of powerful technologies and tools for testing Node.js, Selenium, Jasmine, WebDriver, Cucumber, Mocha ā€¢ Wrapper for Selenium, made for Angular.js ā€¢ Uses angular specific constructs for capturing elements Model, bindings, repeaters etc. ā€¢ Runs on real browsers as well as headless browsers
  • 6. Get Up And Running.. ā€¢ Install Node.js ā€¢ Install Protractor npm install ā€“g protractor ā€¢ Install WebDriver webdriver-manager update ā€¢ Start WebDriver webdriver-manager start // do this before you run the tests
  • 7. Basic Requirements ā€¢ Youā€™ll need 2 basic files to start, ā€¢ A Test/Spec file Contains the element references, assertions ā€¢ The Configuration File Contains the configuration options for running protractor ā€¢ Use your preferred test framework to write tests ā€¢ Jasmine ā€“ Fully Supported ā€¢ Mocha ā€“ Limited Support ā€¢ Cucumber ā€“ Limited Support
  • 8. Sample Config File exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', capabilities: { 'browserName': 'chrome' }, specs: [ 'specs/*Spec.js' ], jasmineNodeOpts: { showColors: true } };
  • 9. Sample Test describe('Test Home Page', function () { it("Should display the text typed in to the input field.", function () { browser.get('http://localhost:8080/#/'); // Type in a value to input field var textInput = element(by.model('sampleInput')); textInput.sendKeys('The KVK Blog'); // Check if the same value is displayed var displayField = element(by.binding('sampleInput')); expect(displayField.getText()).toEqual('The KVK Blog'); }); });
  • 10. Conventional UI Tests ā€¢ Element references are inside tests ā€¢ Test are cluttered ā€¢ Less readable ā€¢ Very fragile
  • 12. What Is A Page Object? ā€œA page object is an object-oriented class that serves as an interface to a page of your AUTā€ ā€¢ Wraps a HTML page/fragment ā€¢ Provide Application Specific API ā€¢ Hides the underlying complexity ā€¢ Used to manipulate elements on page
  • 13. Why Use Page Objects? ā€¢ Reduce Code Duplication ā€¢ Reusable Page Objects ā€¢ More Readable Tests ā€¢ Less Vulnerable to Break ā€¢ More Maintainable Tests Especially in Agile Based Projects
  • 14. A Deeper Diveā€¦ Return Types ā€¢ Methods in Page Objects should return fundamental types Strings, Dates, Booleans ā€¢ It can return other complex types as well Promises, other Page Objects
  • 15. A Deeper Diveā€¦ ā€¢ Method names can be much closer to what the user is actually doing. var inputField = element(by.model(ā€˜first_nameā€™); inputField.sendKeys(ā€˜Kasunā€™); Or element(by.model(ā€˜first_nameā€™)).sendKeys(ā€˜Kasunā€™); Instead We can use somePage.addFirstName(ā€˜Kasunā€™);
  • 16. A Deeper Diveā€¦ The Dilemma ā€¢ Use of assertions ā€¢ Include Assertions inside Page Objects ā€¢ Not Include Assertions inside Page Objects ā€¢ Itā€™s Subjective and the Choice is yoursā€¦
  • 17. A Deeper Diveā€¦ No Assertions in Page Objects for Us. Why?? ā€¢ Separation of Responsibility ā€¢ Page Objects should only provide access to HTML pages ā€¢ Page Objects become longer
  • 18. A Deeper Diveā€¦ What We Believe ā€œIf what we test changes, The assertions and the tests should changeā€ ā€œIf the HTML page changes, The Page Object should changeā€ This, ā€¢ Allows us to easily modify the tests/specs when functionality or underlying HTML pages change overtime
  • 20. You Have NO Questionsā€¦ Right?... ;)
  • 21. Thank You For Not Throwing Rocks At Me ^_^