Protractor tests succeeding prior to complete page load

Recently, my protractor tests have been failing after updating the node_modules. Strangely, it seems like the tests are initiating before the page is fully loaded:

Connecting to the selenium server at http://127.0.0.1:4444/wd/hub
[launcher] Running 1 instances of WebDriver
Spec started

Login
✓ should take me to the homepage
✓ should show the login form

Password > Forgot Password
✓ should go to the forgot password page
✓ should not redirect user if email does not exist

Executed 4 out of 4 specs SUCCESS in 0.025 sec.
Uncaught exception: Error occurred while waiting for Protractor to sync with the page: "[ng:test] no injector found for element argument to getTestability\nhttp://errors.angularjs.org/1.5.8/ng/test"
[launcher] Process exited with error code 1

When I launch Google Chrome, the window opens blank but with the correct URL (http://localhost:8081). However, when I skip running the tests and just use browser.get('/'), the browser navigates correctly to my web app and the page loads as expected.

I have a suspicion that the tests might be running independently from the synchronization between protractor, selenium, and Chrome, causing asynchronous errors.

Currently, I am using the following versions:

  • protractor: 2.5.1
  • selenium-server-standalone: 2.47.1 (Tried also with 2.46.0)
  • chromedriver: latest version, installed through webdriver-update
  • chrome: 52.0.2743.116

Answer №1

Big shoutout to @alecxe for the helpful tip! Switching to v4 resolved my problem.

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

Automated script using Selenium for identifying text boxes with dynamic IDs

I need to interact with an element that has a dynamic Id assigned to it every time. The goal is to input a value into this text box. Here is the HTML code snippet of the text box: <div class="invoicing-details"> <div> <l ...

Error: Unable to access the 'then' property of an undefined object when working with promises

I'm developing a website project that serves as a "Walmart" version of AirBnB. Here's the functionality of the button in question: When a user clicks on the "Make Reservation" button on a listing, they are prompted to select a start and end dat ...

Tips on evaluating the contents within a PDF document

I'm attempting to access in order to determine if the "PDF Test File" exists. This is what my code looks like: it 'pdf test' do visit 'http://www.orimi.com/pdf-test.pdf' puts page.title sleep 5 co ...

jQuery MaskMoney - position input at the start of the field

Check out this jsfiddle I created to showcase the issue I'm facing. Whenever I click on the input field, the cursor automatically goes to the end. This means that I have to start typing cents before dollars, which is not the behavior I want. My desire ...

The web page fails to load when accessed by a bot or requested using Python code

My goal is to extract information from , purely for personal use and not for any illegal activities. I simply want to create a basic script to search for hotels that meet my criteria. However, I am encountering difficulties in accessing the webpage using ...

Fetching selenium logs and screenshots from the Intern grid backend

My question pertains to the Intern workflow in case of exceptions, with two specific parts: 1- According to Selenium's Desired Capabilities specifications, RemoteWebDriver automatically captures screenshots on exceptions unless disabled by setting we ...

What could be the reason my code isn't successfully performing addition within the input field?

As a novice, I am practicing by attempting to retrieve a number from a text field, prompting the user to click a button that adds 2 to that number, and then displaying the result through HTML. However, I keep encountering an issue where NaN is returned whe ...

"Utilizing Jquery for interactive menu functionality - delivering the requested JSON

I have successfully implemented a dynamic menu using jQuery that parses a JSON response file to create the menu. However, instead of having the menu items link to URLs, I want them to retrieve and parse JSON data from those URLs. Despite my efforts, the me ...

What is the best method for retrieving a specific number of elements using Selenium?

When loading a page with 35,000 elements, only the first 10 are relevant to me. Scraping all elements slows down the process considerably. I have managed to retrieve either the first element using: driver.find_element_by Or all 35,000 elements using: d ...

I need assistance with merging a list of authors into a single cell within a CSV file using Python, specifically for a book's authors. I want all the authors to be

I am attempting to extract the names of authors from a book website using Python. The names are currently displayed in one column with multiple rows. I would like to gather all the author names into one cell within a CSV file. Below is the code that I am u ...

Ways to avoid browser refresh when uploading files in React applications

I'm working with a simple file upload form in React using hooks. import React, { useState } from 'react'; import { FlexContainer } from '@styles/FlexContainer'; const TestUpload = () => { const [file, setFile] = useState<F ...

The AJAX function fails to trigger the MVC controller method

I'm attempting to enable inline editing by cell, rather than by row, when double-clicking. Although the initial setup is working, it's not updating the record as expected - the "SaveCustomer" call to the controller isn't triggered. Can anyon ...

AngularJS supports asynchronous validation on blur

Using Angular JS version 1.5.6, I am looking to implement asynchronous input validation that occurs only on blur. However, I am unable to use modelOption: {debounce: 500} or modelOption: {updateOn: 'blur'} due to the directive being used with oth ...

steps to iterate through an array or object in javascript

Hello, I am facing an issue while trying to loop through an array or object. Can someone help me out? Are arrays and objects different when it comes to using foreach? function fetchData() { fetch("https://covid-193.p.rapidapi.com/statistics", { ...

Firebase (web) deploy encounters an issue due to stripe integration

I recently integrated Stripe into my Firebase function index.js: const stripe = require('stripe')('key'); and created a function for checkout sessions: exports.createCheckoutSession = functions.https.onCall(async(data, context) =&g ...

Modifying CSS styles in JavaScript based on the user's browser restrictions

My CSS style looks like this: button.gradient { background: -moz-linear-gradient(top, #00ff00 0%, #009900 50%, #00dd00); background: -webkit-gradient(linear, left top, left bottom, from(#00ff00), color-stop(0.50, #009900), to(#00dd00) ...

Having trouble interacting with element - Selenium WebDriver is not allowing the click

I'm attempting to select the Checkout Button. This is what it looks like : https://i.stack.imgur.com/TiMEO.png And here's the HTML snippet for it : <div id="buy-button-next"> <span data-reactroot=""> <div data-cid="buy- ...

What strategies can be employed to streamline the code provided?

Can someone help simplify this JavaScript code for me? I would really appreciate it. Thank you! $(function() { $("#show1").click(function() { $("#showmore1").toggle(); }) $("#show2").click(function() { $("#showmore2").toggle(); ...

Loading content dynamically into a div from an external or internal source can greatly enhance user experience on a website. By

As I work on my website, I am incorporating a div structure as shown below: <div class="container"> <div class="one-third column"> <a id="tab1" href="inc/tab1.html"><h2>tab1</h2></a> </div> & ...

I'm experimenting with crafting a new color scheme using MUI, which will dynamically alter the background color of my card based on the API

I am attempting to create a function that will change the colors based on the type of Pokemon. However, I'm not sure how to go about it. Any suggestions or ideas!? Check out where I'm brainstorming this logic [This is where the color palette sh ...