Javascript 51
Beginning With Protractor Testing NonAngularJS Application
ProtractorJS provides suits and specs to test web application. In this demo,”We will learn to test a non AngularJS application using protractor”. Two files conf.js and spec.js are required as conf.js contains all the configuration object and spec.js contains all the test cases. In this example we will test to check www.google.com contains a title text […]
Installing Protractor For AngularJS Testing
Protractor provides end to end testing for AngularJS application. In this demo, “We will learn to install protractor”. To install protractor use npm install –g protractor command in the terminal as following screenshot: To set up protractor we need to update webdriver-manager using update command as following screenshot. Web driver manager can be start […]
JavaScript BatteryManager API Demo
Navigator object provides Battery API for accessing charging attribute. a BatteryManager object can be accessed using getBattery() method. In this demo, “We will learn to access charging attribute on chargingchange event fired by BatteryManager”. The following code shows the accessing of BatteryManager API. <!DOCTYPE html> <html> <head lang="en"> <title>Battery Demo</title> </head> <body> <script> navigator.getBattery().then(function(battery) […]
Lodash Pluck And Where Method Example
lodash provides many utility methods for JavaScript developer. pluck() method is used for get the values of keys from a collection/array. where() method returns an array of element with matching property values. In this demo, “We will learn to use the methods pluck and where in lodash utility library”. The following code shows the […]