I am using protractor to test a Non-Angular app and when I use the browser.forkNewDriverInstance()
then it seems browser.forkNewDriverInstance()
is no longer working correctly since I get this error when executing:
Failed: Error while waiting for Protractor to sync with the page: "window.angular is undefined. This could be either beca use this is a
non-angular page or because your test involves client-side navigation, which can interfere with Protractor's boo tstrapping. See http://git.io/v4gXM for details"
here the code:
conf.js
exports.config = {
framework: 'jasmine',
specs: ['test.js','chat_featuresx.js'],
multiCapabilities: [{
browserName: 'chrome'
}],
directConnect: 'true'
}
test.js
describe('First interaction customer-agent', () => {
beforeEach(function() {
global.agent = browser;
global.customer = browser.forkNewDriverInstance();
agent.ignoreSynchronization = true;
customer.ignoreSynchronization = true;
agent.get('http://engager-stage.brandembassy.com/');
customer.get('https://vps-web-utils.awsbrandembassy.com/livechat-window-gherkin/');
agent.driver.manage().window().maximize();
customer.driver.manage().window().maximize();
});
it('should be seen offline when agent is offline and viceversa', () => {
// check that default status is minimized
browser.sleep(2000);
expect(customer.isElementPresent(by.css('.be-chat.be-chat--minimize'))).toBe(true);
});
});