The function waitForAngularEnabled does not exist

Currently, I am conducting end-to-end tests for an Angular application. For the login process, it needs to exit the app, so here is what I am doing:

 browser.waitForAngularEnabled(false);
 //login
 browser.waitForAngularEnabled(true);

While this approach works perfectly fine locally, when executed on browserstack (remote execution), it throws an error:

Failed: protractor_1.browser.waitForAngularEnabled is not a function

Is this a known issue?

For more information, you can refer to a related question on How does waitForAngularEnabled work?

Update: I have also created an issue on the Protractor GitHub repository - https://github.com/angular/protractor/issues/4453

Answer №1

The reason why your browserstack service is not functioning properly is due to Protractor 4 not supporting waitForAngularEnabled(). This method is only available in Protractor 5.

Make sure you have Protractor global installed on your local machine with version 5.x.x if you want to utilize this feature.

If you need to use it with Protractor 4, you can set

browser.ignoreSynchronisation = true|false
as an alternative, refer to this link

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to compare dates in order to obtain the necessary results?

Question : Filter the JSON array to retrieve specific entries 1: All entries with name "Sam". 2: All entries with date "Dec 2019". // JSON Data provided below. var data = [{ "id":"27", "0":{ "name":"Sam", "date":"2021-02-28" ...

Issue with redirecting to another link in Angular routing

After numerous attempts, I finally managed to configure the adviceRouterModule correctly. Despite extensive research and Google searches, I couldn't quite crack it. Here is the configuration for my AdviceRoutingModule: const adviceRouters: Routes = ...

Double firing issue with ngModelChange when paired with ng DateTimePicker in Angular 7

When utilizing the ng datetimepicker library in Angular to display a date time picker, I'm experiencing an issue where the method triggered by (ngModelChange) fires twice simultaneously, causing the changed date to be logged twice in the console. Can ...

Unable to access nativeElement property as @viewChild is not functioning properly

My goal is to focus on a native element when another element is clicked, similar to the HTML attribute "for" but not applicable in this scenario. Despite my efforts, I'm encountering an error: TypeError: Cannot read property 'nativeElement&ap ...

Switching the scope or zone in Angular when handling events external to Angular

Currently, I am utilizing an external library within my Angular 6 application that incorporates customizable event listeners. Specifically, I am employing flowchart.js, although similar issues may arise with other libraries. In the case of flowchart.js, i ...

What are the best ways to make the most of Angular Material density?

Material has introduced a new density component modifier (Check out the links here and here). After importing material/density, I followed the recommended code structure in my scss file: @use "@material/button"; .my-custom-button { // Adjusts ...

The issue with Angular 4 imports not refreshing in a .less file persists

Currently, I am in the process of developing a small Angular project that utilizes less for styling purposes. My intention is to separate the styling into distinct folders apart from the components and instead have a main import file - main.less. This fil ...

Utilizing the Teams web app within my customized electron application

I've been developing an electron app and am trying to integrate the MS Teams web app into it. I've successfully displayed MS Word, MS Powerpoint, and other apps using window.loadURL(''), but I'm experiencing issues with MS Teams. D ...

The issue of ExpressionChangedAfterItHasBeenCheckedError is a common problem faced by Angular

I have implemented a component loading and an interceptor to handle all requests in my application. The loading component is displayed on the screen until the request is completed. However, I am encountering an error whenever the component inside my router ...

What is the best way to incorporate unique styles into a component element directly from the parent HTML that houses it?

I have created a unique component called app-details-banner-component.html: <div class="container"> <div class="row"> <div class="col-7"> <h1 class="project-title">Details</h1&g ...

Utilizing Angular to retrieve a property from a JSON object and exhibit it as an image

I'm facing a challenge with displaying an image from JSON that is stored on an online API. Please excuse my limited knowledge in Angular as I have only been working with it for 2 weeks. The issue arises when I try to access the "image1" property from ...

When considering Angular directives, which is more suitable for this scenario: structural or attribute?

In the process of developing an Angular 5 directive, I aim to incorporate various host views (generated from a component) into the viewContainer. However, I find myself at a crossroads as to whether I should opt for an attribute directive or a structural ...

Having trouble with uploading the profile image in Angular 2? The upload process doesn't

I just started learning Angular and decided to create a profile page. But, I encountered an error while trying to upload a profile image. The error message that I received was POST http://localhost:3000/api/v1/users/avatar/jja 500 (Internal Server Error). ...

What is the proper way to arrange dates within strings in Angular?

I'm currently facing an issue with sorting two strings. The strings in question are: "2022 | Dec (V2 2022)" "2022 | Jul (V1 2022)" Although I am attempting to sort them using localeCompare, it is not yielding the correct result. T ...

Unable to stop interval in Angular 5 application

My setInterval() function seems to be working fine as the timer starts, but I am encountering an issue with clearInterval(). It does not stop the timer when the counter value reaches 100 and continues running continuously. Any help or suggestions would be ...

Having trouble retrieving documents from a nested collection in Firebase

I am attempting to retrieve all documents from Firebase that are based on a query. Here is my current firebase structure: https://i.stack.imgur.com/tXrX8.png Even though I have two documents inside the "ListaFavorite" collection, when I check using empty ...

What is the process for retrieving paginated data from the store or fetching new data from an API service within an Angular 2 application using ngrx-effects?

After coming across this insightful question and answer about the structure of paginated data in a redux store, I found myself pondering how to implement similar principles using ngrx/store in an angular 2 application. { entities: { users: { 1 ...

What methods can I employ to trace anonymous functions within the Angular framework?

I'm curious about how to keep track of anonymous functions for performance purposes. Is there a way to determine which piece of code an anonymous function is associated with? Here's an example of my code: <button (click)="startTimeout()&q ...

Encountering the error message "Received interpolation ({{}}) when an expression was expected" is a common issue when trying to interpolate tag attribute values within an ngFor loop

I've been working with a Devextreme's Datatable and my goal is to dynamically configure the table using a columns configuration array. The plan is to loop through this array using an ngFor and set column tags properties dynamically. Now, the bi ...

A guide to submitting forms within Stepper components in Angular 4 Material

Struggling to figure out how to submit form data within the Angular Material stepper? I've been referencing the example on the angular material website here, but haven't found a solution through my own research. <mat-horizontal-stepper [linea ...