SlideShare a Scribd company logo
Selenium WebDriverJS based framework for automated
testing of Angular 1.x/2.x applications
OLEKSANDR KHOTEMSKYI
https://xotabu4.github.io/website
 Julie Ralph(Google) is one of the main contributors,
made first commits in January 2013
 Created as an answer to question: ”How to make end
to end tests for AngularJS applications easier?”
 Now ProtractorJS reached version 4.x, with over 1300
commits, 5700 GitHub stars, 200 contributors
ProtractorJS for automated testing of Angular 1.x/2.x applications
 Easier than Java
 Thousands of libraries already exist for JS/NodeJS. Friendly community, tons of open
source code. Package manager already included in NodeJS
 Much easier common code like JSON parsing, sending HTTP requests, and others
 Duck-typing, monkey-patching
 Tools are smaller, and project start is faster
 Newest versions of TypeScript or ECMAScript 6 makes code much easier to write and
understand
 Same language for front-end, back-end and tests means that same code execution
environment
 JS is one of the most popular languages today, and TypeScript is as primary in
Angular 2.0
https://dou.ua/lenta/articles/language-rating-jan-2016/
JAVA C# JavaScript PHP PythonC++ Ruby
 Developed by Microsoft team
 Superset of JavaScript (includes JavaScript)
 Compiles to JavaScript (ECMAScript 3, 5 or 6)
 Optional types! This allows to have autocomplete in IDE
 Easier refactoring of code
 Has features that not yet in JavaScript specification
(@Annotations, async/await)
 Compilation errors, instead of runtime errors in JavaScript
ProtractorJS Java Selenium WebDriver
High-level framework Low-level automation library (not framework)
Uses script languages: TypeScript or JavaScript or
both same time
Uses Java
JasimineJS (test runner and assertions),
SauceLabs/BrowserStack integration, basic reporting,
interactive debugger, command line parameters,
configuration files

Node Package Manager shows ~628 results for
‘protractor’
Maven shows ~422 results for ‘selenium webdriver’
Asynchronous, uses own control-flow, and Promises
objects
Synchronous, traditional approach
Ability to run tests in parallel Parallel running should be done with additional
libraries/frameworks
PageObjects are just objects with attributes and
functions
PageObjects require @FindBy annotations and
PageObjectFactory usage.
Plugins. Extra element locators. Mobile browsers
support (with Appium).
Mobile browsers support.
Test Runner
(JasmineJS,
Cucumber …)
ProtractorJS
Selenium JavaScript official
bindings
NodeJS environment
Test Runner
extensions
Selenium Standalone Server (JAVA)
Other JS modules
HTTP
JSON
ChromeDriver GeckoDriver EdgeDriver SafariDriver Other drivers
• Runs on NodeJS 4.x, 5.x, 6.x
• Can be used with different Test Runners (JasmineJS, CucumberJS, Mocha, others)
• Can connect to browser using WebDriver server or directly (Chrome and Firefox only)
• Supports all browsers that WebDriver does: Chrome, Firefox, Edge, Safari, Opera,
PhantomJS and mobile
• Angular 1.x and Angular 2.x ready!
One of the key features of ProtractorJS that it is uses same JSON WebDriver Wire protocol as other
language bindings.
This code will be executed as 3 separate JSON WebDriver Wire Protocol commands:
Synchronizing with
AngularJS application
Locating element on the
page
Sending ‘click’ action for
element
• Protractor uses ‘Wrapper’ pattern to add own features to standard WebDriver, WebElement, Locators objects
Browser(WebDriver instance)
+
Inherited from WebDriver
• getProcessedConfig
• forkNewDriverInstance
• restart
• useAllAngular2AppRoots
• waitForAngular
• findElement
• findElements
• isElementPresent
• addMockModule
• clearMockModules
• removeMockModule
• getRegisteredMockModules
• get
• refresh
• navigate
• setLocation
• getLocationAbsUrl
• debugger
• enterRepl
• pause
• wrapDriver
actions
touchActions
executeScript
executeAsyncScri
pt
call
wait
sleep
getPageSource
close
getCurrentUrl
getTitle
takeScreenshot
switchTo
ElementFinder
+
Inherited from WebElement• then
• clone
• locator
• getWebElement
• all
• element
• $$
• $
• isPresent
• isElementPresent
• evaluate
• allowAnimations
• equals
• getDriver
• getId
• getRawId
• serialize
• findElement
• click
• sendKeys
• getTagName
• getCssValue
• getAttribute
• getText
• getSize
• getLocation
• isEnabled
• isSelected
• submit
• clear
• isDisplayed
• takeScreenshot
Protractor Locators
+
Inherited from WebDriver Locators• addLocator
• binding
• exactBinding
• model
• buttonText
• partialButtonText
• repeater
• exactRepeater
• cssContainingText
• options
• deepCss
• className
• css
• id
• linkText
• js
• name
• partialLinkText
• tagName
• xpath
ProtractorJS for automated testing of Angular 1.x/2.x applications
 JavaScript is single threaded (mostly)
 To have possibility to do multiple tasks at once – JavaScript run them
all in single thread, and quickly switch between them
 Async tasks are running in isolation. To make execution step by step –
callbacks are used
 Callbacks are just functions, that will be called when async function is
finished. It is like – “call this when you are done”. You can pass any
arguments to them
ProtractorJS for automated testing of Angular 1.x/2.x applications
ProtractorJS for automated testing of Angular 1.x/2.x applications
 Pattern to avoid callback hell, extension of callbacks
 Almost every function from API returns special object – Promise
 Promise is a object, that will be resolved to a value (any), or rejected if
value can’t be returned
ProtractorJS for automated testing of Angular 1.x/2.x applications
 Do not try to write in synchronous manner! You should
think differently when writing async code
 When you asserting results – promises automatically
resolved. Do not worry to resolve promise before
assertion
 To wait something on the page – use browser.wait() or
browser.sleep()
 ES7 features are on their way! async/await will make
our life much easier
 Be brave and good luck
ProtractorJS for automated testing of Angular 1.x/2.x applications
https://gist.github.com/Xotabu4/f26afb9e24397c9d059bb984d30a6b0a
Example of simple test case
JAVA + Pure Selenium JAVA + JUNIT
TypeScript + ProtractorJS + JasmineJS
https://gist.github.com/Xotabu4/dcfe83bc98ad304f58f3b05de9cd6c69
https://gist.github.com/Xotabu4/79ece1d104f2557a70cd079b62f46f45
Example of simple pageObject pattern usage
JAVA + Selenium PageObjectFactory (@FindBy)
TypeScript + ProtractorJS
https://gist.github.com/Xotabu4/a9334f22933d1d6a16c820ccb4bd6635
JAVA:
ProtractorJS:
And useful links:
 Protractor site: http://www.protractortest.org
 Promises, WebDriver Control Flow documentation: http://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-
webdriver/lib/promise.html
 Gitter chat: https://gitter.im/angular/protractor
 StackOverflow(top questions): http://stackoverflow.com/questions/tagged/protractor?sort=votes&pageSize=20
 GitHub: https://github.com/angular/protractor
 TypeScript documentation: https://www.typescriptlang.org/docs/tutorial.html
 ES6 features: http://es6-features.org/
 Protractor TypeScript example: https://github.com/angular/protractor/tree/master/exampleTypescript
OLEKSANDR KHOTEMSKYI
https://xotabu4.github.io/website 2016

More Related Content

PDF
Introduction to Protractor
PPTX
Protractor overview
PPTX
Automated Testing using JavaScript
PPTX
Selenium for Jobseekers
PPTX
Using protractor to build automated ui tests
PPTX
Test Automation with Twist and Sahi
PPTX
Step by step - Selenium 3 web-driver - From Scratch
PPTX
Automated Smoke Tests with Protractor
Introduction to Protractor
Protractor overview
Automated Testing using JavaScript
Selenium for Jobseekers
Using protractor to build automated ui tests
Test Automation with Twist and Sahi
Step by step - Selenium 3 web-driver - From Scratch
Automated Smoke Tests with Protractor

What's hot (20)

PPTX
Protractor Testing Automation Tool Framework / Jasmine Reporters
PPTX
Automation using Javascript
PPTX
Selenium topic 1- Selenium Basic
PPTX
Angular js automation using protractor
PDF
What's new in selenium 4
DOCX
Protractor end-to-end testing framework for angular js
PDF
Better Page Object Handling with Loadable Component Pattern
PPTX
Tech talks (Automation on Selenium Web Driver. How to begin & implement)
PDF
Selenium
PDF
Testing Code.org's Interactive CS Curriculum
PPTX
Selenium WebDriver - Test automation for web applications
PPT
selenium training | selenium course | selenium video tutorial | selenium for ...
PPT
Intro to Service Worker API and its use cases
PPT
Selenium Architecture
PPT
Nakal think test_2015
PPTX
Introducing ASP.NET Core 2.0
PPTX
Better Page Object Handling with Loadable Component Pattern
PDF
Selenium Tips & Tricks
PDF
How To Use Selenium Successfully (Java Edition)
PPTX
Selenium - Introduction
Protractor Testing Automation Tool Framework / Jasmine Reporters
Automation using Javascript
Selenium topic 1- Selenium Basic
Angular js automation using protractor
What's new in selenium 4
Protractor end-to-end testing framework for angular js
Better Page Object Handling with Loadable Component Pattern
Tech talks (Automation on Selenium Web Driver. How to begin & implement)
Selenium
Testing Code.org's Interactive CS Curriculum
Selenium WebDriver - Test automation for web applications
selenium training | selenium course | selenium video tutorial | selenium for ...
Intro to Service Worker API and its use cases
Selenium Architecture
Nakal think test_2015
Introducing ASP.NET Core 2.0
Better Page Object Handling with Loadable Component Pattern
Selenium Tips & Tricks
How To Use Selenium Successfully (Java Edition)
Selenium - Introduction
Ad

Viewers also liked (20)

PPT
Protractor powerpoint
PDF
Protractor: Tips & Tricks
PDF
PPTX
Bring stories to life using BDD (Behaviour driven development)
PPTX
Protractor
PPTX
Presentation_Protractor
PDF
Automated Testing in Angular Slides
PDF
Apéro techno node.js + AngularJS @Omnilog 2014
PDF
Octo Technology - Refcard Tests Web front-end
PDF
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
PDF
Cucumber.js: Cuke up your JavaScript!
PPTX
Better End-to-End Testing with Page Objects Model using Protractor
PDF
The LAZY Developer's Guide to BDD (with Cucumber)
PPTX
Typescript ppt
PPTX
TypeScript Overview
PDF
Workshop - E2e tests with protractor
PPTX
Automated Testing with Cucumber, PhantomJS and Selenium
PDF
Apresentação de Padrões de Design para Aplicativos Móveis.
PDF
Introduction to Protractor
PDF
Javascript test frameworks
Protractor powerpoint
Protractor: Tips & Tricks
Bring stories to life using BDD (Behaviour driven development)
Protractor
Presentation_Protractor
Automated Testing in Angular Slides
Apéro techno node.js + AngularJS @Omnilog 2014
Octo Technology - Refcard Tests Web front-end
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Cucumber.js: Cuke up your JavaScript!
Better End-to-End Testing with Page Objects Model using Protractor
The LAZY Developer's Guide to BDD (with Cucumber)
Typescript ppt
TypeScript Overview
Workshop - E2e tests with protractor
Automated Testing with Cucumber, PhantomJS and Selenium
Apresentação de Padrões de Design para Aplicativos Móveis.
Introduction to Protractor
Javascript test frameworks
Ad

Similar to ProtractorJS for automated testing of Angular 1.x/2.x applications (20)

PPTX
QA Fes 2016. Александр Хотемской. Обзор ProtractorJS как фреймворка для брауз...
PPTX
Selenium Basics and Overview topics.pptx
PPTX
Selenium Basics and Overview1233444.pptx
PPTX
Introduction to React native
PPTX
Automated ui-testing
PDF
Automation Testing using Selenium Webdriver
PPTX
Advanced JavaScript
PPTX
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
PPT
Top java script frameworks ppt
PPT
Automation with Selenium Presented by Quontra Solutions
PDF
Selenide
PPTX
Javascript Frameworks Comparison
PDF
Beginning MEAN Stack
PDF
JavaScript and jQuery for SharePoint Developers
PDF
Web Test Automation Framework - IndicThreads Conference
PDF
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
PPT
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
PPTX
Selenium.pptx
PDF
Selenium - Introduction
PDF
Basics of Selenium IDE,Core, Remote Control
QA Fes 2016. Александр Хотемской. Обзор ProtractorJS как фреймворка для брауз...
Selenium Basics and Overview topics.pptx
Selenium Basics and Overview1233444.pptx
Introduction to React native
Automated ui-testing
Automation Testing using Selenium Webdriver
Advanced JavaScript
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Top java script frameworks ppt
Automation with Selenium Presented by Quontra Solutions
Selenide
Javascript Frameworks Comparison
Beginning MEAN Stack
JavaScript and jQuery for SharePoint Developers
Web Test Automation Framework - IndicThreads Conference
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
Selenium.pptx
Selenium - Introduction
Basics of Selenium IDE,Core, Remote Control

More from Binary Studio (20)

PPTX
Academy PRO: D3, part 3
PPTX
Academy PRO: D3, part 1
PPTX
Academy PRO: Cryptography 3
PPTX
Academy PRO: Cryptography 1
PPTX
Academy PRO: Advanced React Ecosystem. MobX
PPTX
Academy PRO: Docker. Part 4
PPTX
Academy PRO: Docker. Part 2
PPTX
Academy PRO: Docker. Part 1
PPTX
Binary Studio Academy 2017: JS team project - Orderly
PPTX
Binary Studio Academy 2017: .NET team project - Unicorn
PPTX
Academy PRO: React native - miscellaneous
PPTX
Academy PRO: React native - publish
PPTX
Academy PRO: React native - navigation
PPTX
Academy PRO: React native - building first scenes
PPTX
Academy PRO: React Native - introduction
PPTX
Academy PRO: Push notifications. Denis Beketsky
PPTX
Academy PRO: Docker. Lecture 4
PPTX
Academy PRO: Docker. Lecture 3
PPTX
Academy PRO: Docker. Lecture 2
PPTX
Academy PRO: Docker. Lecture 1
Academy PRO: D3, part 3
Academy PRO: D3, part 1
Academy PRO: Cryptography 3
Academy PRO: Cryptography 1
Academy PRO: Advanced React Ecosystem. MobX
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 1
Binary Studio Academy 2017: JS team project - Orderly
Binary Studio Academy 2017: .NET team project - Unicorn
Academy PRO: React native - miscellaneous
Academy PRO: React native - publish
Academy PRO: React native - navigation
Academy PRO: React native - building first scenes
Academy PRO: React Native - introduction
Academy PRO: Push notifications. Denis Beketsky
Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 1

Recently uploaded (20)

PPTX
Presentation of Computer CLASS 2 .pptx
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
medical staffing services at VALiNTRY
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Build Multi-agent using Agent Development Kit
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Introduction to Artificial Intelligence
PPTX
Transform Your Business with a Software ERP System
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Materi_Pemrograman_Komputer-Looping.pptx
PPTX
Materi-Enum-and-Record-Data-Type (1).pptx
PDF
System and Network Administration Chapter 2
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
top salesforce developer skills in 2025.pdf
Presentation of Computer CLASS 2 .pptx
VVF-Customer-Presentation2025-Ver1.9.pptx
PTS Company Brochure 2025 (1).pdf.......
medical staffing services at VALiNTRY
Online Work Permit System for Fast Permit Processing
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
L1 - Introduction to python Backend.pptx
Odoo POS Development Services by CandidRoot Solutions
2025 Textile ERP Trends: SAP, Odoo & Oracle
Build Multi-agent using Agent Development Kit
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Introduction to Artificial Intelligence
Transform Your Business with a Software ERP System
Upgrade and Innovation Strategies for SAP ERP Customers
Materi_Pemrograman_Komputer-Looping.pptx
Materi-Enum-and-Record-Data-Type (1).pptx
System and Network Administration Chapter 2
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
top salesforce developer skills in 2025.pdf

ProtractorJS for automated testing of Angular 1.x/2.x applications

  • 1. Selenium WebDriverJS based framework for automated testing of Angular 1.x/2.x applications OLEKSANDR KHOTEMSKYI https://xotabu4.github.io/website
  • 2.  Julie Ralph(Google) is one of the main contributors, made first commits in January 2013  Created as an answer to question: ”How to make end to end tests for AngularJS applications easier?”  Now ProtractorJS reached version 4.x, with over 1300 commits, 5700 GitHub stars, 200 contributors
  • 4.  Easier than Java  Thousands of libraries already exist for JS/NodeJS. Friendly community, tons of open source code. Package manager already included in NodeJS  Much easier common code like JSON parsing, sending HTTP requests, and others  Duck-typing, monkey-patching  Tools are smaller, and project start is faster  Newest versions of TypeScript or ECMAScript 6 makes code much easier to write and understand  Same language for front-end, back-end and tests means that same code execution environment
  • 5.  JS is one of the most popular languages today, and TypeScript is as primary in Angular 2.0 https://dou.ua/lenta/articles/language-rating-jan-2016/ JAVA C# JavaScript PHP PythonC++ Ruby
  • 6.  Developed by Microsoft team  Superset of JavaScript (includes JavaScript)  Compiles to JavaScript (ECMAScript 3, 5 or 6)  Optional types! This allows to have autocomplete in IDE  Easier refactoring of code  Has features that not yet in JavaScript specification (@Annotations, async/await)  Compilation errors, instead of runtime errors in JavaScript
  • 7. ProtractorJS Java Selenium WebDriver High-level framework Low-level automation library (not framework) Uses script languages: TypeScript or JavaScript or both same time Uses Java JasimineJS (test runner and assertions), SauceLabs/BrowserStack integration, basic reporting, interactive debugger, command line parameters, configuration files  Node Package Manager shows ~628 results for ‘protractor’ Maven shows ~422 results for ‘selenium webdriver’ Asynchronous, uses own control-flow, and Promises objects Synchronous, traditional approach Ability to run tests in parallel Parallel running should be done with additional libraries/frameworks PageObjects are just objects with attributes and functions PageObjects require @FindBy annotations and PageObjectFactory usage. Plugins. Extra element locators. Mobile browsers support (with Appium). Mobile browsers support.
  • 8. Test Runner (JasmineJS, Cucumber …) ProtractorJS Selenium JavaScript official bindings NodeJS environment Test Runner extensions Selenium Standalone Server (JAVA) Other JS modules HTTP JSON ChromeDriver GeckoDriver EdgeDriver SafariDriver Other drivers
  • 9. • Runs on NodeJS 4.x, 5.x, 6.x • Can be used with different Test Runners (JasmineJS, CucumberJS, Mocha, others) • Can connect to browser using WebDriver server or directly (Chrome and Firefox only) • Supports all browsers that WebDriver does: Chrome, Firefox, Edge, Safari, Opera, PhantomJS and mobile • Angular 1.x and Angular 2.x ready!
  • 10. One of the key features of ProtractorJS that it is uses same JSON WebDriver Wire protocol as other language bindings. This code will be executed as 3 separate JSON WebDriver Wire Protocol commands: Synchronizing with AngularJS application Locating element on the page Sending ‘click’ action for element
  • 11. • Protractor uses ‘Wrapper’ pattern to add own features to standard WebDriver, WebElement, Locators objects Browser(WebDriver instance) + Inherited from WebDriver • getProcessedConfig • forkNewDriverInstance • restart • useAllAngular2AppRoots • waitForAngular • findElement • findElements • isElementPresent • addMockModule • clearMockModules • removeMockModule • getRegisteredMockModules • get • refresh • navigate • setLocation • getLocationAbsUrl • debugger • enterRepl • pause • wrapDriver actions touchActions executeScript executeAsyncScri pt call wait sleep getPageSource close getCurrentUrl getTitle takeScreenshot switchTo
  • 12. ElementFinder + Inherited from WebElement• then • clone • locator • getWebElement • all • element • $$ • $ • isPresent • isElementPresent • evaluate • allowAnimations • equals • getDriver • getId • getRawId • serialize • findElement • click • sendKeys • getTagName • getCssValue • getAttribute • getText • getSize • getLocation • isEnabled • isSelected • submit • clear • isDisplayed • takeScreenshot
  • 13. Protractor Locators + Inherited from WebDriver Locators• addLocator • binding • exactBinding • model • buttonText • partialButtonText • repeater • exactRepeater • cssContainingText • options • deepCss • className • css • id • linkText • js • name • partialLinkText • tagName • xpath
  • 15.  JavaScript is single threaded (mostly)  To have possibility to do multiple tasks at once – JavaScript run them all in single thread, and quickly switch between them  Async tasks are running in isolation. To make execution step by step – callbacks are used  Callbacks are just functions, that will be called when async function is finished. It is like – “call this when you are done”. You can pass any arguments to them
  • 18.  Pattern to avoid callback hell, extension of callbacks  Almost every function from API returns special object – Promise  Promise is a object, that will be resolved to a value (any), or rejected if value can’t be returned
  • 20.  Do not try to write in synchronous manner! You should think differently when writing async code  When you asserting results – promises automatically resolved. Do not worry to resolve promise before assertion  To wait something on the page – use browser.wait() or browser.sleep()  ES7 features are on their way! async/await will make our life much easier  Be brave and good luck
  • 22. https://gist.github.com/Xotabu4/f26afb9e24397c9d059bb984d30a6b0a Example of simple test case JAVA + Pure Selenium JAVA + JUNIT TypeScript + ProtractorJS + JasmineJS https://gist.github.com/Xotabu4/dcfe83bc98ad304f58f3b05de9cd6c69
  • 23. https://gist.github.com/Xotabu4/79ece1d104f2557a70cd079b62f46f45 Example of simple pageObject pattern usage JAVA + Selenium PageObjectFactory (@FindBy) TypeScript + ProtractorJS https://gist.github.com/Xotabu4/a9334f22933d1d6a16c820ccb4bd6635
  • 25. And useful links:  Protractor site: http://www.protractortest.org  Promises, WebDriver Control Flow documentation: http://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium- webdriver/lib/promise.html  Gitter chat: https://gitter.im/angular/protractor  StackOverflow(top questions): http://stackoverflow.com/questions/tagged/protractor?sort=votes&pageSize=20  GitHub: https://github.com/angular/protractor  TypeScript documentation: https://www.typescriptlang.org/docs/tutorial.html  ES6 features: http://es6-features.org/  Protractor TypeScript example: https://github.com/angular/protractor/tree/master/exampleTypescript OLEKSANDR KHOTEMSKYI https://xotabu4.github.io/website 2016

Editor's Notes

  • #3: Последняя 4.4
  • #7: Мое мнение – для новых проектов использовать уже TypeScript, старые можно частично мигрировать на TypeScript, или оставить как есть. ПОКАЖИ ВИДЕО!!!
  • #9: Здесь важно сказать что протрактор работает по точно такому же протоколу как и Java bindings. То есть в браузере разницы видно не будет. + javascript бингинги официальные, и поддерживаются практически наравне с джавашными и остальными. WebDriver wire protocol
  • #10: Protractor element EXTENDS WebDriverJS element, so all functions are accessible.
  • #11: Here is exampe of simple Protractor interaction with the page: First, Protractor tells the browser to run a snippet of JavaScript. This is a custom command which asks Angular to respond when the application is done with all timeouts and asynchronous requests, and ready for the test to resume. Then, the command to find the element is sent. Finally the command to perform a click action is sent. Summary: Protractor uses the same API to manipulate browser as any other language bindings, so browser won’t notice any difference here
  • #12: Protractor element EXTENDS WebDriverJS element, so all functions are accessible.
  • #13: Protractor element EXTENDS WebDriverJS element, so all functions are accessible.
  • #14: ProtractorBy.prototype.deepCss - Find an element by css selector within the Shadow DOM. ProtractorBy.prototype.options - Find an element by ng-options expression.
  • #15: Тут рассказать про асинхронность и контрол флоу Больше всего у людей которые начинают переходить в мир JS взрывает мозг именно асинхронность. Попытаемся рассказать основные моменты
  • #19: Это вернет Promise, который станет или текущим именем пользователя, или пустой строкой, в случае если такого элемента не существует.
  • #23: Explicit creating and closing of browser is needed
  • #24: Explicit creating and closing of browser is needed