Found 8895 Articles for Front End Technology

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

261 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

432 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

How to use Button Component in Material UI?

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

622 Views

The button is used to perform some actions like form submission, file upload, link click, web page routing etc. The Material Ui provides the pre-styled button component, which users can import into the React application and use inside the React component. Different variants of the button are available in the Material UI, and users can use any according to their requirements. Execute the below command in the terminal to install the Material UI library. npm install @mui/material @emotion/react @emotion/styled Syntax Users should follow the syntax below to use the Button component of the Material Ui library. Click ... Read More

How to use Box Component in Material UI?

Shubham Vora
Updated on 06-Apr-2023 15:07:07

922 Views

As the Box name suggests, it allows users to add the box of different dimensions on the web page. Users can also add any custom HTML content inside the Box component. Also, users can style the box by passing the style as props. To use the Box component of Material UI, users need to run the below command in the terminal to install the Material library. npm install @mui/material @emotion/react @emotion/styled Syntax Users should follow the syntax below to use the Box component of the Material UI library. Content of the Box. Users can see how ... Read More

How to use API inside callbacks using jQuery DataTables plugin ?

Shubham Vora
Updated on 06-Apr-2023 15:03:40

335 Views

In jQuery, the DataTables plugin allows us to add some extra features to the HTML table. When you create a table using the raw HTML, it looks unformatted. So, we need to style it using CSS. Also, we need to add some functionalities to the table, like pagination, searching into the table, and sorting in ascending and descending order according to a particular column's data. So, this all can take lots of effort from one developer. What if I say we add all functionalities using the DataTables plugin? Yes, you heard right. Here, we will look at the different examples ... Read More

Advertisements