Protractor Page Object Tutorial

We can build page objects for Protractor, Protractor Page Object. Page objects can be used to write easy to understand, better maintained and more cleaner tests. Page objects can be used to better build tests which make more sense and are also easier to refactor overtime.

Protractor Page Object Video Tutorial

protractor page object

Direct Video Link

Page objects are an excellent way of representing web pages in code. JavaScript does not exactly allows us to create the conventional page objects so instead we will create scripts to represent page objects. Follow the video tutorial above to learn more about page objects.

Protractor CSS Expression

Similar to Protractors Locators we can also make use of Protractor CSS Expression as a means of finding an element on a web page. Once found on said web page we can also interact with them. CSS Expression behave very similarly to WebDriver CSS locator. In other words the CSS Expression help to locate an element on a web page by looking through the cascading style sheets of a given web page.

Protractor CSS Expression Video Tutorial

protractor css expression

Direct Video Link

Follow this video tutorial to learn more about using CSS Expression to help identify an element on a web page and then interact with them.

Protractor Hooks Turorial

Protractor Hooks can be used to write code which will automatically executed when running tests. Specifically we can write before and after hooks for our protractor tests. We can use before hooks to execute code before any given test is executed and similar the same concept would apply to a test for the after hook. The after hook can be used to run code after a test has finished running.

Protractor Hooks Video Tutorial

protractor hooks

Direct Video Link

As part of the before hook we can write code to help with the setup of tests. Similarly for after hooks we can write code to help clean up tests.

Protractor Expect Tutorial

In this video tutorial we will talk about Protractor Expect or otherwise know as the assertions of the Protractor world. As said ‘Expect’ statements very similar to how someone would write assertions in a JUnit test. Expects statements are used to identify wheather a test has satisfied the condition which it is trying to test or wheather the condition has failed. If the condition is satisfied then the test is marked as Pass. If it fails then is instead marked as Failed.

Protractor Expect Video Tutorial

protractor expect

Direct Video Link

In this video we will cover Expects statements and see how they can be used to write meaningful tests.

Protractor Locators Tutorial

In this video tutorial we will discuss Protractor Locators or more specifically bindings. Bindings are what we use to help find elements on a web page. We will look at how to use locators provided by Protractor’s rich API to try and find element on a web page. Once we find an element on a web page we will also look a number of ways on how we can interact with them. Locators are fundamental to writing tests as they help to write create scenarios.

Protractor Locators Video Tutorial

protractor locators

Direct Video Link

Follow this video tutorial to learn about using locators in protractor, more specifically called bindings.

Protractor Configuration Test Tutorial

We will now look at Protractor Configuration Test. We will look at how to configure Protractor to allow us to create the initial setup as well as writing and running our first test. As already discussed Protractor is the equalivent to WebDriver but in JavaScript and this is what we will do. We will configure Protractor and write our first Protractor test in JavaScript. This will be a fresh new welcome as opposed to writing in Java.

Protractor Configuration Test Video Tutorial

protractor configuration test

Direct Video Link

Follow the video tutorial above to learn more about Protractor configuration and running test.

Protractor Setup Tutorial

In this first post for Protractor we are going to go through AngularJS Protractor setup Tutorial. We are going to assume that your system has never had Protractor run on it before and we will go through everything from software installation to getting your first Protractor test running. If you interested in finding out more about Protractor, how it works and runs then follow the video tutorial below to get started.

Protractor Setup Tutorial

protractor setup tutorial

Direct Video Link

Once we have setup our environment and protractor framework we will be able to begin writing tests using good old JavaScript.