Hi,
When i am trying to execute protractor script using safari browser for angular JS Application,
then I am getting below error but same is working with firefox and chrome.
Environment: MAC OS Siera
Browser: Safari 11.1.1
Protractor : Version 5.4.1
Node : v8.12.0
/**
var todoList = element.all(by.repeater('todo in todoList.todos'));
expect(todoList.count()).toEqual(3);
expect(todoList.get(2).getText()).toEqual('write first protractor test');
// You wrote your first test, cross it off the list
todoList.get(2).element(by.css('input')).click();
var completedAmount = element.all(by.css('.done-true'));
expect(completedAmount.count()).toEqual(2);
});
});
/**
[08:54:12] I/launcher - Running 1 instances of WebDriver
[08:54:12] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
Started
[08:54:25] E/protractor - Could not find Angular on page https://angularjs.org/ : angular never provided resumeBootstrap
[31mF[0m
Failures:
1) angularjs homepage todo list should add a todo
Message:
[31m Failed: Angular could not be found on the page https://angularjs.org/. If this is not an Angular application, you may need to turn off waiting for Angular.
Please see
https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular-on-page-load[0m
Stack:
Error: Angular could not be found on the page https://angularjs.org/. If this is not an Angular application, you may need to turn off waiting for Angular.
Please see
https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular-on-page-load
at executeAsyncScript_.then (/Users/azhar/Documents/Workspace_protractor/freeCRM_Protractor/protractor/built/browser.js:720:27)
at ManagedPromise.invokeCallback_ (/Users/azhar/Documents/Workspace_protractor/freeCRM_Protractor/protractor/node_modules/selenium-webdriver/lib/promise.js:1376:14)
at TaskQueue.execute_ (/Users/azhar/Documents/Workspace_protractor/freeCRM_Protractor/protractor/node_modules/selenium-webdriver/lib/promise.js:3084:14)
at TaskQueue.executeNext_ (/Users/azhar/Documents/Workspace_protractor/freeCRM_Protractor/protractor/node_modules/selenium-webdriver/lib/promise.js:3067:27)
at asyncRun (/Users/azhar/Documents/Workspace_protractor/freeCRM_Protractor/protractor/node_modules/selenium-webdriver/lib/promise.js:2927:27)
at /Users/azhar/Documents/Workspace_protractor/freeCRM_Protractor/protractor/node_modules/selenium-webdriver/lib/promise.js:668:7
at
at process._tickCallback (internal/process/next_tick.js:189:7)
From: Task: Run it("should add a todo") in control flow
at UserContext.
From asynchronous test:
Error
at Suite.
at Object.
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
1 spec, 1 failure
Finished in 10.431 seconds
[08:54:25] I/launcher - 0 instance(s) of WebDriver still running
[08:54:25] I/launcher - safari #01 failed 1 test(s)
[08:54:25] I/launcher - overall: 1 failed spec(s)
[08:54:25] E/launcher - Process exited with error code 1
But when I am making changes in spec.js file as browser.waitForAngularEnabled(false) then its working as expected but "https://angularjs.org" is an angular js application and why its behaving differently as its working in chrome and firefox without any issue.
/**
element(by.model('todoList.todoText')).sendKeys('write first protractor test');
element(by.css('[value="add"]')).click();
var todoList = element.all(by.repeater('todo in todoList.todos'));
expect(todoList.count()).toEqual(3);
// expect(todoList.get(2).getText()).toEqual('write first protractor test');
// You wrote your first test, cross it off the list
todoList.get(2).element(by.css('input')).click();
var completedAmount = element.all(by.css('.done-true'));
expect(completedAmount.count()).toEqual(2);
});
});
Seeing this too. Can we please get some love here?
Any fix for this I'm seeing it in Safari 12.1.2
Same here for Safari 13.0.3
Have anyone found a solution?
@sjelin @juliemr: Do you have any hint here?
Most helpful comment
Seeing this too. Can we please get some love here?