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

Error while waiting for Protractor to sync with the page: "window.angular is undefined. This could be eithe r because this is a non-angular page or because your test involves client-side navigation, which can interfere with Prot ractor's bootstrapping. #4180

Closed
nadeemgori2 opened this issue Mar 24, 2017 · 2 comments

Comments

@nadeemgori2
Copy link

Hi there!

Thanks for submitting an issue to Protractor.

To help us help you better, please do the following before submitting an issue:

  1. Review the questions section of CONTRIBUTING.md.
  2. Make sure you are not asking a usage or debugging question. If you are, use StackOverflow, Google Group discussion list, or Gitter to get help.
  3. Provide a minimally reduced test case. This makes it much more likely that your bug will be fixed. Protractor has a test Angular application available at http://www.protractortest.org/testapp which you can use for the reproducible test case.
  4. Fill in the information that corresponds to your type of issue below.
  5. Delete this intro and any unrelated text 😄 (if you do not we'll assume you haven't read these instructions and automatically close the issue.)

Bug report

  • Node Version: ``
  • Protractor Version: ``
  • Angular Version: ``
  • Browser(s): ``
  • Operating System and Version ``
  • Your protractor configuration file
  • A relevant example test
  • Output from running the test
  • Steps to reproduce the bug
  • The URL you are running your tests against (if relevant)

Feature Request

  • Reasons for adopting new feature
  • Is this a breaking change? (How will this affect existing functionality)
@nadeemgori2
Copy link
Author

describe("Test this for input field", function () {

beforeEach(function() {
        browser.get("http://localhost:3000/login");
})

it('Testing using Page Object', function(){    
    element(by.css('input')).sendKeys("Cloud");
     element(by.buttonText('Submit')).click();
     
    browser.switchTo().frame(0); 
   $('#username').sendKeys("[email protected]");                
   $('#password').sendKeys("password");
   $('#kc-login').click();
    
    $('#account').click();
        
   
    
     $('#simple-card_c').click();
     

   browser.pause( 65535);     
    

});

});

i am getting this Error:

[18:56:00] I/launcher - Running 1 instances of WebDriver
[18:56:00] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
Started
[18:56:05] I/protractor - Encountered browser.pause(), but debugger already attached.
F

Failures:

  1. Test this for input field Testing using Page Object
    Message:
    Failed: Error while waiting for Protractor to sync with the page: "window.angular is undefined. This could be eithe
    r because this is a non-angular page or because your test involves client-side navigation, which can interfere with Prot
    ractor's bootstrapping. See http://git.io/v4gXM for details"
    Stack:
    Error: Error while waiting for Protractor to sync with the page: "window.angular is undefined. This could be either
    because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protr
    actor's bootstrapping. See http://git.io/v4gXM for details"
    at runWaitForAngularScript.then (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\lib\browser.ts:65
    2:19)
    at ManagedPromise.invokeCallback_ (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\se
    lenium-webdriver\lib\promise.js:1366:14)
    at TaskQueue.execute_ (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdr
    iver\lib\promise.js:2970:14)
    at TaskQueue.executeNext_ (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-w
    ebdriver\lib\promise.js:2953:27)
    at asyncRun (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\p
    romise.js:2813:27)
    at C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:
    676:7
    at process.tickDomainCallback (internal/process/next_tick.js:129:7)Error
    at ElementArrayFinder.applyAction
    (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\lib\element.ts
    :482:23)
    at ElementArrayFinder.(anonymous function) [as sendKeys] (C:\Users\nago0716\AppData\Roaming\npm\node_modules\pro
    tractor\lib\element.ts:96:21)
    at ElementFinder.(anonymous function) [as sendKeys] (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protract
    or\lib\element.ts:873:14)
    at Object. (D:\project\Angular_project\sales-intelligence-frontend\test\home_spec.js:14:23)
    at C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:110:25
    at new ManagedPromise (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdr
    iver\lib\promise.js:1067:7)
    at ControlFlow.promise (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webd
    river\lib\promise.js:2396:12)
    at schedulerExecute (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index
    .js:95:18)
    at TaskQueue.execute_ (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdr
    iver\lib\promise.js:2970:14)
    at TaskQueue.executeNext_ (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-w
    ebdriver\lib\promise.js:2953:27)
    From: Task: Run it("Testing using Page Object") in control flow
    at Object. (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\ind
    ex.js:94:19)
    at C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:64:48
    at ControlFlow.emit (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriv
    er\lib\events.js:62:21)
    at ControlFlow.shutdown_ (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-we
    bdriver\lib\promise.js:2565:10)
    at shutdownTask_.MicroTask (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-
    webdriver\lib\promise.js:2490:53)
    at MicroTask.asyncRun (C:\Users\nago0716\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdr
    iver\lib\promise.js:2619:9)
    From asynchronous test:
    Error
    at Suite. (D:\project\Angular_project\sales-intelligence-frontend\test\home_spec.js:7:5)
    at Object. (D:\project\Angular_project\sales-intelligence-frontend\test\home_spec.js:1:1)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)

1 spec, 1 failure
Finished in 5.214 seconds

[18:56:08] I/launcher - 0 instance(s) of WebDriver still running
[18:56:08] I/launcher - chrome #1 failed 1 test(s)
[18:56:08] I/launcher - overall: 1 failed spec(s)
[18:56:08] E/launcher - Process exited with error code 1

@wswebcreation
Copy link
Contributor

I think you answer you own question ;-)

  1. Review the questions section of CONTRIBUTING.md.
  2. Make sure you are not asking a usage or debugging question. If you are, use StackOverflow, Google Group discussion list, or Gitter to get help.

I think your question is not protractor related.

What you can also check if your logon page holds Angular or not, if not, then the issue clear ;-)

Grtz

Wim

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

3 participants