SlideShare a Scribd company logo
1
Kapil Sethi
kapil.sethi9@gmail.com
Jagannath
vjagannath09@gmail.com
2
About Us…
• Quality Analysts
• Automation enthusiast
• Worked with
3
Protractor Introduction
• E2E testing framework for Angular JS Web apps
• Wrapper around WebDriverJS
• Takes advantage of selenium grid to run multiple
browser at once
• Uses javascript test frameworks like Jasmine, Mocha
to write test suites
4
Protractor Set-up
• Install node.js
• Check the node.js version – node --version
• Check npm version - npm -v
5
Protractor Set-up
• Install JDK
• Check java version - java -version
• Install protractor - npm install -g protractor
• Check protractor version – protractor --version
6
Protractor Set-up
• Run webdriver-manager update
• Check webdriver manager is updated – webdriver-
manager status
• Start selenium server – webdriver-manager start
7
Writing First Protractor Test
• Protractor uses Jasmine test framework for its
testing interface
• Protractor needs 2 files to run, a 'spec' and a
'configuration' file
8
Sample Conf File
exports.config = {
framework: 'jasmine2',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: [
'*-spec.js'],
capabilities: {
browserName: 'chrome'}
};
9
Running Against Different Browsers
exports.config = {
framework: 'jasmine2',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: [
'*-spec.js'],
capabilities: {
browserName: 'firefox'}
};
10
Running Tests In Parallel
exports.config = {
framweork: "jasmine2",
seleniumAddress: "http://localhost:4444/wd/hub",
specs: [
'*-spec.js'],
capabilities:{
browserName: 'chrome',
shardTestFiles: true,
maxInstances: 2,
},
};
11
Running Tests with DirectConnect
exports.config = {
framweork: "jasmine2",
//seleniumAddress: "http://localhost:4444/wd/hub",
specs: [
'*-spec.js'],
capabilities:{
browserName: 'chrome',
shardTestFiles: true,
maxInstances: 2,
},
};
12
Running Tests in Headless Mode
• Install phantomjs - npm install phantomjs
exports.config = {
framweork: "jasmine2",
seleniumAddress: "http://localhost:4444/wd/hub",
specs: [
'*-spec.js'],
capabilities:{
browserName: 'phantomjs',
'phantomjs.binary.path': require('phantomjs').path,
shardTestFiles: true,
maxInstances: 2,
},
};
13
References
Readings:
• Tutorial:
• https://angular.github.io/protractor/#/
• Config:
• https://github.com/angular/protractor/blob/master/docs/refer
enceConf.js
• Timeout:
• https://github.com/angular/protractor/blob/master/docs/time
outs.md
• Code:
• https://github.com/qabrains/ProtractorTests

More Related Content

PPTX
Presentation_Protractor
PPTX
Protractor overview
PPTX
Automation using Javascript
PPTX
Automated Testing using JavaScript
PDF
Automated Web Testing using JavaScript
PDF
Introduction to Protractor
PPTX
Protractor for angularJS
PDF
AngularJS and Protractor
Presentation_Protractor
Protractor overview
Automation using Javascript
Automated Testing using JavaScript
Automated Web Testing using JavaScript
Introduction to Protractor
Protractor for angularJS
AngularJS and Protractor

What's hot (20)

PPTX
Automated Smoke Tests with Protractor
PPTX
Using protractor to build automated ui tests
PDF
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
KEY
Jellyfish, JSCONF 2011
PDF
Testing with Codeception (Webelement #30)
PPTX
Protractor Tutorial Quality in Agile 2015
PPTX
Get Started With Selenium 3 and Selenium 3 Grid
ODP
Mastering selenium for automated acceptance tests
PPTX
How To Automate Cross Browser Testing
DOCX
Protractor end-to-end testing framework for angular js
PPTX
Better End-to-End Testing with Page Objects Model using Protractor
PDF
Cypress - Best Practices
PPTX
Protractor training
KEY
JavaScript Testing VIA Selenium
PDF
UI Testing Automation
PPTX
Cypress for Testing
PPTX
Progressive Web App Testing With Cypress.io
PDF
Automation Testing
PPTX
An Introduction to AngularJS End to End Testing using Protractor
PDF
Selenium Testing on Chrome - Google DevFest Armenia 2015
Automated Smoke Tests with Protractor
Using protractor to build automated ui tests
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Jellyfish, JSCONF 2011
Testing with Codeception (Webelement #30)
Protractor Tutorial Quality in Agile 2015
Get Started With Selenium 3 and Selenium 3 Grid
Mastering selenium for automated acceptance tests
How To Automate Cross Browser Testing
Protractor end-to-end testing framework for angular js
Better End-to-End Testing with Page Objects Model using Protractor
Cypress - Best Practices
Protractor training
JavaScript Testing VIA Selenium
UI Testing Automation
Cypress for Testing
Progressive Web App Testing With Cypress.io
Automation Testing
An Introduction to AngularJS End to End Testing using Protractor
Selenium Testing on Chrome - Google DevFest Armenia 2015
Ad

Viewers also liked (10)

PPTX
Bring stories to life using BDD (Behaviour driven development)
PDF
Automated Testing in Angular Slides
PPTX
ProtractorJS for automated testing of Angular 1.x/2.x applications
PDF
Cucumber.js: Cuke up your JavaScript!
PDF
The LAZY Developer's Guide to BDD (with Cucumber)
PDF
Workshop - E2e tests with protractor
PPTX
Automated Testing with Cucumber, PhantomJS and Selenium
PDF
Protractor: Tips & Tricks
PDF
Сергей Больщиков "Protractor Tips & Tricks"
PPTX
ATAGTR2017 Protractor Cucumber BDD Approach
Bring stories to life using BDD (Behaviour driven development)
Automated Testing in Angular Slides
ProtractorJS for automated testing of Angular 1.x/2.x applications
Cucumber.js: Cuke up your JavaScript!
The LAZY Developer's Guide to BDD (with Cucumber)
Workshop - E2e tests with protractor
Automated Testing with Cucumber, PhantomJS and Selenium
Protractor: Tips & Tricks
Сергей Больщиков "Protractor Tips & Tricks"
ATAGTR2017 Protractor Cucumber BDD Approach
Ad

Similar to Protractor (20)

PPTX
Protractor End To End Testing For AngularJS
PPTX
Jmeter_Presentaion_Parag
PPTX
Test automation proposal
PPTX
test_automation_POC
PDF
Performance Testing using Real Browsers with JMeter & Webdriver
PPTX
Selenium with protractor
PPTX
Selenium practical
PDF
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
PPTX
Using Jenkins and Jmeter to build a scalable Load Testing solution
PDF
Testing Spring MVC and REST Web Applications
PPTX
Introduction to blazemeter and jmeter
PDF
Selenium Online Training.pdf
PDF
Selenium Online Training.pdf
PDF
Selenium Online Training.pdf
PDF
Selenium Online Training.pdf
ODP
Dot Net Notts Js Unit Testing at Microlise
PDF
Selenium Online Training.pdf
PDF
Testing with Spring: An Introduction
ODP
Js unit testingpresentation
PDF
Testing Angular
Protractor End To End Testing For AngularJS
Jmeter_Presentaion_Parag
Test automation proposal
test_automation_POC
Performance Testing using Real Browsers with JMeter & Webdriver
Selenium with protractor
Selenium practical
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Using Jenkins and Jmeter to build a scalable Load Testing solution
Testing Spring MVC and REST Web Applications
Introduction to blazemeter and jmeter
Selenium Online Training.pdf
Selenium Online Training.pdf
Selenium Online Training.pdf
Selenium Online Training.pdf
Dot Net Notts Js Unit Testing at Microlise
Selenium Online Training.pdf
Testing with Spring: An Introduction
Js unit testingpresentation
Testing Angular

Recently uploaded (20)

PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
System and Network Administraation Chapter 3
PDF
medical staffing services at VALiNTRY
PPTX
L1 - Introduction to python Backend.pptx
PPT
Introduction Database Management System for Course Database
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
How Creative Agencies Leverage Project Management Software.pdf
How to Migrate SBCGlobal Email to Yahoo Easily
Understanding Forklifts - TECH EHS Solution
Upgrade and Innovation Strategies for SAP ERP Customers
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PTS Company Brochure 2025 (1).pdf.......
Softaken Excel to vCard Converter Software.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
System and Network Administraation Chapter 3
medical staffing services at VALiNTRY
L1 - Introduction to python Backend.pptx
Introduction Database Management System for Course Database
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Design an Analysis of Algorithms I-SECS-1021-03
Odoo POS Development Services by CandidRoot Solutions
How Creative Agencies Leverage Project Management Software.pdf

Protractor

  • 2. 2 About Us… • Quality Analysts • Automation enthusiast • Worked with
  • 3. 3 Protractor Introduction • E2E testing framework for Angular JS Web apps • Wrapper around WebDriverJS • Takes advantage of selenium grid to run multiple browser at once • Uses javascript test frameworks like Jasmine, Mocha to write test suites
  • 4. 4 Protractor Set-up • Install node.js • Check the node.js version – node --version • Check npm version - npm -v
  • 5. 5 Protractor Set-up • Install JDK • Check java version - java -version • Install protractor - npm install -g protractor • Check protractor version – protractor --version
  • 6. 6 Protractor Set-up • Run webdriver-manager update • Check webdriver manager is updated – webdriver- manager status • Start selenium server – webdriver-manager start
  • 7. 7 Writing First Protractor Test • Protractor uses Jasmine test framework for its testing interface • Protractor needs 2 files to run, a 'spec' and a 'configuration' file
  • 8. 8 Sample Conf File exports.config = { framework: 'jasmine2', seleniumAddress: 'http://localhost:4444/wd/hub', specs: [ '*-spec.js'], capabilities: { browserName: 'chrome'} };
  • 9. 9 Running Against Different Browsers exports.config = { framework: 'jasmine2', seleniumAddress: 'http://localhost:4444/wd/hub', specs: [ '*-spec.js'], capabilities: { browserName: 'firefox'} };
  • 10. 10 Running Tests In Parallel exports.config = { framweork: "jasmine2", seleniumAddress: "http://localhost:4444/wd/hub", specs: [ '*-spec.js'], capabilities:{ browserName: 'chrome', shardTestFiles: true, maxInstances: 2, }, };
  • 11. 11 Running Tests with DirectConnect exports.config = { framweork: "jasmine2", //seleniumAddress: "http://localhost:4444/wd/hub", specs: [ '*-spec.js'], capabilities:{ browserName: 'chrome', shardTestFiles: true, maxInstances: 2, }, };
  • 12. 12 Running Tests in Headless Mode • Install phantomjs - npm install phantomjs exports.config = { framweork: "jasmine2", seleniumAddress: "http://localhost:4444/wd/hub", specs: [ '*-spec.js'], capabilities:{ browserName: 'phantomjs', 'phantomjs.binary.path': require('phantomjs').path, shardTestFiles: true, maxInstances: 2, }, };
  • 13. 13 References Readings: • Tutorial: • https://angular.github.io/protractor/#/ • Config: • https://github.com/angular/protractor/blob/master/docs/refer enceConf.js • Timeout: • https://github.com/angular/protractor/blob/master/docs/time outs.md • Code: • https://github.com/qabrains/ProtractorTests