Try to load the view with browser.driver.get('http://myapp'). Calling the webdriver api directly will not wait for angular to be ready.

Then you can run the script.

browser.driver.executeScript('window.runningProtractorTests = true;');


And then continue using the protractor api.

You may have to add a browser.waitForAngular() to make sure that angular is ready before proceeding with your test.

Protractor test vs long-polling
I asked this related question in stack overflow, Hence this forum is dedicated for sharepoint, Thought to ask here!!

I got to know how to get the Excel using sharepoint Excel web access webpart. However I am getting an error "Excel Services is unable to process the request. Wait a few minutes and try performing this operation again!!" Even If I directly access the Excel from the document library also getting the same error!!
