Protractor is in demand now a days for Angular and AngularJS applications. Even people are using Protractor for Non-Angular applications as well because its fast and you need to write less code to handle browser , parallel testing and cross browser testing.
In this post, I will explain how can we start learning Protractor or basic prerequisites to start with Protractor.
Since Protractor is a NodeJS program, You must be aware of basics of below programming language:-
- JavaScript
- NPM
- NodeJS (Its a running environment for JS programs)
- Jasmine
- TypeScript
JavaScript:-
You should start with JavaScript first and try to learn and practise at least basic concepts of JavaScript. You should focus on below topics:-
- Variables
- Data Types
- Type Conversions
- Operators
- Comparisons
- Conditional Statements
- Looping Statements
- Function and Function expressions
- Objects
- Object methods, “this”
- Constructor, operator “new”
- Numbers
- String
- Arrays
- JSON Methods
- Var, let and const
- Global Object
- Scheduling: setTimeout and setInterval
- Decorators and forwarding, call/apply
- Inheritance
- Error Handling
- Callbacks
- Promises
- Async/await
- Module
I found below websites useful to learn JavaScript:-
- https://javascript.info/ – Free
- https://codewithmosh.com/ – Paid
- https://stackify.com/larn-javascript-tutorials/ – Free
- https://developer.mozilla.org/en-US/docs/Web/Tutorials – Free
NPM and NodeJS:-
Once you have basic knowledge of JavaScript, start Learning basics of NPM and NodeJS. No need to go deep in these but cover basics. You will find so many similarities in JavaScript and NodeJS because Node JS is an interpreter or running environment for a JavaScript programming language.
I found below websites useful to learn NPM and NodeJS:-
- https://www.npmjs.com/
- https://www.sitepoint.com/beginners-guide-node-package-manager/
- https://www.sitepoint.com/learn/nodejs/nodejs-tutorials/
- https://codewithmosh.com/ – Paid
Jasmine:-
Since Protractor comes with Jasmine test framework by default, so you should be aware of Jasmine. It is similar to TestNG or JUnit for Java. Jasmine is a behavior-driven development framework for testing JavaScript code. It does not depend on any other JavaScript frameworks. It does not require a DOM. And it has a clean, obvious syntax so that you can easily write tests.
You can refer its official website to learn Jasmine:-
Once above topics are over, you are good to start with Protractor.
TypeScript:-
TypeScript scales JavaScript. It is superset of JavaScript. Since Protractor tests can be written in JavaScript and TypeScript both and TypeScript is much powerful than JavaScript, I am sure Protractor tests will be written mostly in TypeScript. That’s why I have added TypeScript also as a Prerequisites.
You can refer its official website to learn TypeScript:-
https://www.typescriptlang.org/docs/home.html
I will try to cover maximum in my blog.
More on Protractor in upcoming posts. Stay tuned and keep learning with me.
#ThanksForReading
Please cover basics of JS so that we can follow up.