Using Protractor for AngularJS Automation Testing

Using protractor for angularjs automation testing.jpg

In our application, which is built using AngularJS, we required to write an automated script that is supposed to run on headless browser (without invoking browser).
However, Selenium locators were not able to find the elements in headless browser mode. Protractor comes to our rescue which supports locating extra HTML attributes such as ng-repeater, ng-controller, ng-model using headless browser- PhantomJS.

Protractor is an open source functional automation framework designed specifically for AngularJS web applications. This tool is a combination of technologies such as Jasmine, Selenium Webdriver, and Node.js etc. It’s a wrapper built on top of Selenium Webdriver and thus provides all the capabilities of Selenium along with many useful additions.


Topics: selenium Automation testing AngularJS Protractor

Dynamic Expression Tree Builder


In enterprise when applications are developed using Entity Framework it is always essential to have a generic code which can be used in entire application. For this purpose, different practices are adopted. One of the popular one is repository pattern Unit of Work. The generic repository is written which is responsible for all CRUD operations. This enhances the code reusability and ensures no further changes in the data layer logic.

Topics: AngularJS dynamic expression tree Entity Framework LINQ

Angular 4 is here!

By skipping the Angular 3 version, Google surprised everyone with the announcement of Angular 4, a latest advancement to mobile and desktop development JavaScript framework. This announcement evidenced, Google is more focused on improving the features of Angular rather than just increasing version numbers.

During the NG-BE 2016 Angular Conference held at Belgium, Igor Minar the Angular Team Lead at Google, already introduced Angular 4 version and demonstrated the schedule of future Angular version releases. At the conference he stated, Google will shift to Angular version 4 from the version 2, to associate the version 4 router with the upgrade.

Coming to what’s new in Angular 4, the most salient feature, it is slimmer and faster as compared to the previous versions. It is meant for the applications heavily dependent on animations where the core animation functions are transferred to a discrete package which can now be used separately. Considering this change, developers could easily look for the documentation and leverage the autocompletion.

In addition, the Ahead of Time (AoT) compilation is the major feature introduced in Angular 4 version. While in AoT mode, templates are compiled at runtime during the build and the JavaScript code is generated. AoT mode enables faster application to execution by generating extremely less amount of code, which as a result improves application performance irrespective of its size.
The entire framework is modified with TypeScript, a typed superset of JavaScript in which the Angular 4 version uses TypeScript 2.1. The new version of TypeScript offers amazing features to comply with the modern web ecosystem.

Also, a source map will be generated for the error cases within a template to facilitate relevant context considering the original template. Because of the downward compatibility, the Angular team disabled the TypeScripts strictNullchecks setting with the current release, as they need to work more on this particular feature.

Yes, by introducing the Angular 4 version, Google has taken a step towards the future. So have you already started planning your Angular 4 migration?
Topics: Google AngularJS Angular 4 TypeScript 2.1

User authentication & access privilege checking in AngularJS application


Topics: AngularJS AngularJS application

AngularJS Modularization & Dependency Injection

AngularJS provides a built-in dependency injection mechanism. Using dependency injection mechanism you can split your application into multiple different types of components. AngularJS can inject these multiple different types of components into each other. Modularization of your application is important for making it easy for reuse, configure and test the components in your application.

Here is the list of AngularJS’s core types of objects and components:

  • Value
  • Factory
  • Service
  • Provider
  • Constant

AngularJS dependency injection mechanism is useful for injecting these core types into each other. Now, we will discuss how to define and inject these components into each other.

Topics: AngularJS modularizing applications dependency injection

e-Zest is a leading digital innovation partner for enterprises and technology companies that utilizes emerging technologies for creating engaging customers experiences. Being a customer-focused and technology-driven company, it always helps clients in crafting holistic business value for their software development efforts. It offers software development and consulting services for cloud computing, enterprise mobility, big data and analytics, user experience and digital commerce.