Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Failed: Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined. This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping. See http://git.io/v4gXM for details" This is the error message is displayed with code error : 1 when I run my below script #4658

Closed
SivaDixit opened this issue Jan 12, 2018 · 2 comments

Comments

@SivaDixit
Copy link

SivaDixit commented Jan 12, 2018

I am using page object model in the below code. but If I use a normal code it works fine. can you tell me where to correct this code. As this is a confidential project I cannot present my current url
config file:
exports.config={
directConnect: true,
framework: 'jasmine',
capabilities:
{
'browserName' : 'chrome'

    },
   
    specs: ['specs.js'],
    
jasmineNodeOpts: {
    showColors: true,
    
}

Page object model
var CAPTNLoginpage = function(){
var NameInput = element(by.id('userNameInput'));
var PasswordInput = element(by.id('passwordInput'));
var Submit = element(by.id('submitButton'));

this.get=function(){
  
    browser.get('https://xxxxxxxx/', 25000);
    browser.ignoreSyncronization=true;
    browser.driver.sleep(10000);
    var title = browser.getTitle();
    console.log(title);
};

this.setName = function(name){
    NameInput.sendKeys(name);
};

this.setPassword = function(password){
    PasswordInput.sendKeys(password);
};

this.loginsubmit=function(){
    Submit.click();
};

};

module.exports = new CAPTNLoginpage();

specs
var CAPTNLogin = require('./CAPTNLoginpage');
describe('CAPTN Login Page', function(){

it('Should login into CAPTN',function(){
   
    CAPTNLogin.get();
    
    CAPTNLogin.setName('xxxxxxxxxxx');
    CAPTNLogin.setPassword('5196qL25196qL2');
    CAPTNLogin.loginsubmit();

});

});

If I use a normal procedure then It works fine
Specs without Page object model
describe('Protractor Demo App', () => {

it('should have title', () =>  {
    browser.get('xxxxxxxxxxxxxx/');
  browser.ignoreSynchronization = true;
    browser.driver.sleep(30000);
    var a = browser.getTitle();
    console.log(a);
    element(by.id('userNameInput')).sendKeys('xxxxxxxxxxxxxxx');
    element(by.id('passwordInput')).sendKeys('xxxxxxxxxxxxxx');
    element(by.id('submitButton')).click();
});

});

@wswebcreation
Copy link
Contributor

Hi there!

Your question is better suited for StackOverflow or Gitter. Please ask a question there with the 'protractor' tag or post in the Gitter Channel to get help.

From the the getting help section of the README:

Please ask usage and debugging questions on StackOverflow
(use the "protractor" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)

Thanks!

@ghost
Copy link

ghost commented Mar 26, 2019

See #5177 this is a yet uncorrected bug/defect that manifested again with the latest updates of webdriver-manager and protractor. It is not a coding issue.

How to reproduce: do a fresh install on Windows 7 or 10 of Nodejs. Install the latest protractor. (Assuming you can get around the Chrome phantom version 74 issue angular/webdriver-manager#351) Run the simple tutorial from the protractor page: http://www.protractortest.org/#/tutorial and observer.

BLUF: No new user can get protractor running on Windows. Any existing user who updated protractor cannot get protractor running on Windows 7/10.

Cheers, RW

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants