I am writing e2e tests for a non-angular app using protractor and while there is quite a bit of information on how to accomplish this, it seems there are many different ways and so I have some fundamental questions.
When testing non-angular sites some folks say to just use webdriver calls, 'browser.driver.get()' for instance so that protractor does not expect angular to finish loading on a page etc. Other responses say that you can set browser.ignoreSynchronization = true, and make calls to browser.get() with no problem (this seems like the ideal solution so you can rely on one api call if dealing with angular and non-angular). Are these two methods equivalent and if not please explain differences.
Does protractor still respect promises when dealing with webdriver or browser.ignoreSynchronization = true? For instance if I make a 'get' call, will protractor wait before executing next step until that 'get' request is fulfilled?
Related to #2, Do I have to use promise chaining when dealing with webdriver/non-angular app to ensure user interactions are executed in order? For example if I use sendKeys() to enter a name and then click() to submit info, do I have to nest the click() inside of sendKeys().then?
How exactly does webdriver know all elements of a page are ready after a get request (every solution I see involves using a timeout or relying checking if an element exists first)? What if that page has embedded apps (like a google map for instance) and I want to simulate a user clicking on 'view larger map' for my e2e test?
Copyright Notice:Content Author:「user2714417」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/38107615/testing-non-angular-app-with-protractor-and-webdriver-fundamentals