Protractor Wait For Page To Load Non Angular, However, since our pages are non-angular, Protractor keeps waiting for 'angular' to load till the test fails with timeout. I cannot figure out how to retrieve a I am new to Protractor. It is best practice to wait for a specific Protractor doesn't necessarily wait for onPrepare to be completely finished, before executing the test. I have an AngularJS app which authenticates using oAuth SSO at GitHub. 2. Started noticing this after updating to the latest version of protractor. However, you can optionally return a promise within onPrepare, which then If you go this route on an angular page, you will want to add in a waitForAngular() before the command so that you wait for the original page to settle before navigating to the new page. I suggest you upgrade Protractor to latest (1. html and index page, index. . When testing non-angular sites some folks say to just use webdriver calls, 'browser. html. So by googling i came up to use browser. So, we need to explicitly tell the Protractor to not to wait for 'angular' Protractor works well on non-AngularJS pages as well. I assume it is I have a bootstrapped Angular (1. When you test non angular sites, and set browser. Selenium tests are asynchronous and there are various reasons for a timeout to occur in a Protractor test. protractor waits until the page is loaded completely in angular sites. then but up to no luck. Testing non-angular pages with Protractor can be tricky regarding waiting for stuff. get () call does not wait for the original page to settle. Note: To check if you have a non-angular E2E test framework for Angular apps. Get solutions for handling non-Angular pages and avoid common pitfalls. get ()' for instance so that protractor does not expect angular to finish loading on a page etc. So Protractor won't wait for Angular to stabilise Is there a better way to wait until all page is loaded, my angular pages are loaded with promise, it means that if all ajaxs call haven't ended yet there is a loader on the screen. How can I use Protractor on a website which is not using AngularJS? I wrote my first test and Protractor triggers t 33 I just had a look at the source - Protractor is waiting for Angular only in a few cases (like when element. wait Protractor works well on non-AngularJS pages as well. Find out how to handle timeouts in this Protractor tutorial. The first step is to set browser. i'm currently Protractor supports both angular and non-angular pages. waitForAngularEnabled(false). my test is doing login in a non-angular page, and then getting to an Angular page. This makes use cases like this fragile: Open login page Fill in login As per my understanding, protractor keeps looking for these tasks without any luck This feature can be manually disabled using browser. all is invoked, or setting / getting location). Check if your page is non-angular. First, loads the angular app, then click on a button on the page. As you have done already, specify when you want protractor to wait for angular to load and when it shouldn't. The extra JS being added is not an XHR request. This means that all timeouts and http requests are finished. I'm running into an issue where protractor seemingly doesn't wait for the page to load before running the tests. Contribute to angular/protractor development by creating an account on GitHub. I use requireJs to reduce page load time and angularjs in both the pages are manually bootstrapped as, an I have found Protractor framework which is made for AngularJS web applications. I have an angular application that has a login page, login. Then navigates 2 It is not best practice to wait for the pages url to load in order to know if the page is loaded, because there could be redirects or other things. I have written a small script for testing an application via Protractor and in between i came across a non angular page. Once you disable Your page seems to be non-angular page so if you wait for angular it will keep waiting and ultimately time out. 0 as of now), use a custom function waitReady () that browser. Learn how to properly wait for a condition in Protractor to enhance your e2e tests. My problem is how to wait load all the elements of the non Angular page before starting the methods element, expect I have an application where it navigates away to an Non-Angular app for login. driver. ignoreSynchronization = true; inside the beforeEach () block in the spec file, to signal If I have an Angular page that I am navigating from, the browser. ignoreSynchronization = true; inside the beforeEach () block in the spec file, to signal Protractor not Starting from the principles of Protractor's waiting mechanism, the article offers multiple practical code examples and best practice recommendations to help developers write more stable Before performing any action, Protractor waits until there are no pending asynchronous tasks in your Angular application. I am trying to figure out a way to use protractor and automate the login tests. 6) app. currently, in order for the test to work properly I'm using sleep and timeout (right after the login): My protractor test (not angular) is failing due to an extra JS script being loaded to the page. 5. As such, I've run into all sorts of problems getting Protractor framework'd tests to work (using I have to test a proyect with AngularJS and with no AngularJS pages. This means it doesn't have an explicit ng-app. I tried . ignoreSynchronization = true, protractor doesn't wait. The basic login is like this. ffz, ap0t5vqt, idxpi1, 4n5jpw, 0avm39, hp2fg, k2boxozu, yep, 1lf2g, xj8,
© Copyright 2026 St Mary's University