Found 10711 Articles for Web Development

How TypeScript Compilation Works?

Shubham Vora
Updated on 06-Apr-2023 16:06:41

2K+ Views

The popular programming language TypeScript has been widely adopted by developers in recent years. It is a superset of JavaScript that enhances the language with static typing and other features to make complicated application development simpler and error-prone. However, TypeScript code must be compiled into JavaScript because it cannot be performed directly in a browser or server. Any developer using TypeScript must comprehend how TypeScript compilation operates. There are multiple processes in the TypeScript compilation process, including parsing, type-checking, outputting JavaScript, bundling, and execution. The TypeScript compiler parses the code during the parsing phase and creates an abstract syntax tree ... Read More

How to use protractor to wait for the element’s attribute to change to a particular value?

Shubham Vora
Updated on 06-Apr-2023 16:05:31

393 Views

We will learn to use protractor to wait for the element’s attribute to change to a particular value. Protractor is an end-to-end testing framework for Angular and AngularJS applications. Protractor has built-in support for waiting for Angular-specific elements to load and be ready before performing test operations. We need to learn this topic to ensure that tests only proceed when specific elements are ready, avoiding errors and improving the accuracy of the test results. Waiting for an attribute to change to a particular value also helps identify and debug issues related to data manipulation and other dynamic events on the ... Read More

How to use protractor to check whether text is present in an element or not?

Shubham Vora
Updated on 06-Apr-2023 15:59:51

363 Views

We will learn to use Protractor to check whether text is present in an element or not. Protractor is an end-to-end testing framework for Angular and AngularJS applications. It uses WebDriverJS and runs tests written in Jasmine or Mocha, allowing for automated browser testing of web applications. Protractor can simulate user interaction with the application, test for expected behaviour, and report on test results. It also includes several features designed specifically for Angular, such as the ability to wait for Angular-specific elements to load before executing tests. Note − To use a protractor, ensure that the protractor installation and setup ... Read More

How to use protractor to check if an element is visible?

Shubham Vora
Updated on 06-Apr-2023 15:52:53

1K+ Views

We will learn to use Protractor to check if an element is visible. Protractor is an end-to-end testing framework for Angular and AngularJS applications. It uses Selenium WebDriver to automate browser interactions and provides a high-level API to write tests in JavaScript or TypeScript. It uses Jasmine as the test framework. It provides many features, such as automatic synchronization with the AngularJS application, page object model support, and more. Note − To use a protractor, make sure that installation and setup of the protractor have already been done. User may need to set the Execution Policy to ‘RemoteSigned’ Or ‘Unrestricted’ ... Read More

How to test the name of tag of an element using Protractor?

Shubham Vora
Updated on 06-Apr-2023 15:49:08

263 Views

We will learn to use protractor to test the name of the tag of an element. Protractor is an end-to-end testing framework for Angular and AngularJS applications. Protractor is built on top of WebDriverJS, which is a JavaScript implementation of the WebDriver API, and supports multiple browsers such as Chrome, Firefox, and Safari. It is popular among developers and testers because it provides a simple and effective way to test Angular applications without having to write complex code. Learning how to test the name of the tag of an element using a Protractor is a crucial aspect of automated testing ... Read More

How to test the id of an element using Protractor?

Shubham Vora
Updated on 06-Apr-2023 15:48:09

150 Views

We will learn to use a protractor to test the ID of an element. Protractor is an end-to-end testing framework for Angular and AngularJS applications. Protractor is built on top of WebDriverJS, which is a JavaScript implementation of the WebDriver API and supports multiple browsers such as Chrome, Firefox, and Safari. It is popular among developers and testers because it provides a simple and effective way to test Angular applications without writing complex code. Learning how to test the id of an element using Protractor is important for web developers and quality assurance (QA) testers who want to ensure that ... Read More

How to test if an element has class using Protractor?

Shubham Vora
Updated on 06-Apr-2023 15:46:33

433 Views

We will learn to use the protractor test if an element has class using Protractor. Protractor is an end-to-end testing framework for Angular and AngularJS applications. Protractor is built on top of WebDriverJS, a JavaScript implementation of the WebDriver API, and supports multiple browsers such as Chrome, Firefox, and Safari. Testing if an element has a specific class is important because it allows us to check if a certain style or behaviour is applied to the element as intended. This is especially useful in scenarios where the presence or absence of a specific class triggers certain styles or behaviours. By ... Read More

How to use underscore.js as a template engine?

Shubham Vora
Updated on 06-Apr-2023 15:42:01

642 Views

A straightforward and lightweight templating technique for creating dynamic information within HTML is offered by the JavaScript library known as Underscore.js. A template must be defined in the HTML file using the script tag and a custom type attribute to use underscore.js as a template engine. The template should be contained in the script tag's contents, which can also contain variables and JavaScript expressions. The _.template() function compiles the template and returns a function that can be called with data object to produce the desired result. The ability to call the built function with any data object makes creating dynamic ... Read More

How to use protractor to wait for new tab to be created?

Shubham Vora
Updated on 06-Apr-2023 15:39:17

381 Views

Popular end-to-end testing framework Protractor performs tests against a web application in a real browser, mimicking user interactions. It is used with Angular and AngularJS apps. A new tab or window may open when a user hits a link or button in an online application. This is a typical scenario. It is crucial in these circumstances to wait for the new tab to be formed before making any additional changes to it. We can use the browser to wait for Protractor to open a new tab in conjunction with the browser's wait() feature. The method getAllWindowHandles() A list of all ... Read More

How to use CircularProgress Component in ReactJS?

Shubham Vora
Updated on 06-Apr-2023 14:58:34

1K+ Views

The circular progress bar is an attractive UI for any application. We can show the circular loading indicator whenever our application fetches data from the server; users are uploading files or downloading data. Here, we will learn different approaches to creating a circular progress bar using the various libraries. Use the React-circular-progressbar NPM Package The react-circular-progressbar is an NPM package, and we can import the ‘circularProgressbar’ component. It takes value as a prop to show circular progress. Users should execute the below command in the terminal to install the react-circular-progressbar NPM package in the React application. npm i react-circular-progressbar Syntax ... Read More

Advertisements