You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I am researching Protractor for testing a CEF client that runs Angular.
The client launches as expected when running protractor, but stops immediately because "angular could not be found on the window".
If I add a browser.get('http://url/to/test-server') call to my spec, the spec passes. However, this is not an expected user behavior (because the app just points to one site and the user can't open a new location) and I don't want it at the beginning of all of my tests!
Adding another browser call, like browser.wait(), does not make this work correctly.
Is there another way that I can wait for Angular to wake up inside my client without first performing some action that none of our users will be able to perform?
FWIW, I am currently using chromedriver and the python bindings for selenium to drive this client very successfully without a needing to call browser/driver.get().
Thanks for any help anyone can offer!
Here's a code snippet, with some path and server details obfuscated:
// conf.jsexports.config={seleniumAddress: 'http://localhost:4444/wd/hub',capabilities: {'browserName': 'chrome','chromeOptions': {binary: '/path/to/cefclient',args: ['serverurl=http://url/to/test-server']}},specs: ['spec.js'],}// spec.jsdescribe('My cefclient',function(){beforeEach(function(){browser.wait(function(){return$('#Username').isPresent();})// This wait() doesn't help mebrowser.get('http://url/to/test-server')// This get() helps me, but I'd prefer not to use it.});it('should have a title',function(){expect(browser.getTitle()).toEqual('Expected Page Title');});});
The text was updated successfully, but these errors were encountered:
You need some other way of waiting until not only the element is present, but Angular is loaded on the page. I don't know if there's a user-visible way to see if the page is still loading (like waiting until a spinner element is absent?) If that doesn't work, you could just manually wait until angular is present:
Thanks for getting back to me so quickly, and sorry for asking a general question here. I couldn't find any help elsewhere!
I am trying the wait you suggested, but it times out awfully quickly:
Error: Wait timed out after 157ms
We do load an offline page first that fetches the angular app from the server, so I've tried waiting for an element there to disappear but can't make that succeed (possibly due to operator error).
Your help is much appreciated! I think I need to do some more reading and experimenting.
Hello! I am researching Protractor for testing a CEF client that runs Angular.
The client launches as expected when running protractor, but stops immediately because "angular could not be found on the window".
If I add a browser.get('http://url/to/test-server') call to my spec, the spec passes. However, this is not an expected user behavior (because the app just points to one site and the user can't open a new location) and I don't want it at the beginning of all of my tests!
Adding another browser call, like browser.wait(), does not make this work correctly.
Is there another way that I can wait for Angular to wake up inside my client without first performing some action that none of our users will be able to perform?
FWIW, I am currently using chromedriver and the python bindings for selenium to drive this client very successfully without a needing to call browser/driver.get().
Thanks for any help anyone can offer!
Here's a code snippet, with some path and server details obfuscated:
The text was updated successfully, but these errors were encountered: