v10.11.05.4.16.1.8Safari 12macOS 10.13.6The configuration file is the same as the one which was generated by the CLI. Only the browserName was changed and the directConnect property was removed.
// ... as provided by @angular/cli
capabilities: {
'browserName': 'safari'
},
// remove the directConnect property
// ...
It's enough to just run the default tests.
ng e2e
should display welcome message
- Failed: Could not parse requested URL 'data:text/html,<html></html>'
npx --package @angular/cli ng new safari-test
cd safari-test
# Change the browserName in the config to 'safari' and remove the directConnect property.
ng e2e
A workaround is to add browser.resetUrl = 'about:blank'; to the onPrepare function. But I think it would be nice if Protractor works with Safari out of the box. A fix for Safari which does at least not break tests with Chrome would be to change the DEFAULT_RESET_URL to 'about:blank'. But I don't know if that has implications which affect other browsers.
https://github.com/angular/protractor/blob/master/lib/browser.ts#L22
Please let me know if you think it is a viable solution. I'm happy to provide a pull request for changing that.
Any news on this issue?
Same here. Anything new?
Any update or fix for this issue ??
Bug report
- Node Version:
v10.11.0- Protractor Version:
5.4.1- Angular Version:
6.1.8- Browser(s):
Safari 12- Operating System and Version
macOS 10.13.6- Your protractor configuration file
The configuration file is the same as the one which was generated by the CLI. Only the browserName was changed and the directConnect property was removed.
// ... as provided by @angular/cli capabilities: { 'browserName': 'safari' }, // remove the directConnect property // ...
- A relevant example test
It's enough to just run the default tests.
ng e2e
- Output from running the test
should display welcome message - Failed: Could not parse requested URL 'data:text/html,<html></html>'
- Steps to reproduce the bug
npx --package @angular/cli ng new safari-test cd safari-test # Change the browserName in the config to 'safari' and remove the directConnect property. ng e2eA workaround is to add
browser.resetUrl = 'about:blank';to the onPrepare function. But I think it would be nice if Protractor works with Safari out of the box. A fix for Safari which does at least not break tests with Chrome would be to change theDEFAULT_RESET_URLto 'about:blank'. But I don't know if that has implications which affect other browsers.https://github.com/angular/protractor/blob/master/lib/browser.ts#L22
Please let me know if you think it is a viable solution. I'm happy to provide a pull request for changing that.
Do you have any update for this? My suite is not running on Safari
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
System info: host: 'INC02Q40GKG8WP', ip: 'fe80:0:0:0:c94:4b60:1b53:e9fb%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14', java.version: '1.8.0_172'
Driver info: driver.version: unknown
Tried the example given in https://github.com/angular/protractor/blob/master/docs/browser-setup.md website, that as well is giving the same error. I think it has something to do with the driver.
Facing same issue, Any fix for this issue?
Any fix for this issue? What is the alternative anyone is trying right now?
We are now encountering the same issue in the @GlobaLeaks project: https://api.travis-ci.org/v3/job/582019060/log.txt
@chrisguttandin have you found any solution?
@juliemr @cnishina do you have any advice?
@chrisguttandin: is it possible that the app you were testing was implementing Content Security Policy headers preventing data URIs?
Actually this comment by @juliemr seems relevant: https://github.com/angular/protractor/issues/1223#issuecomment-53091420
https://github.com/angular/protractor/issues/4964#issuecomment-529104052
Yes we have csp enabled in our app.
Hi @evilaliv3, no I don't use CSP when running the tests.
As mentioned in the bug report above a workaround is to add browser.resetUrl = 'about:blank'; to the onPrepare function as done for example here.
super, thank you!
Most helpful comment
Hi @evilaliv3, no I don't use CSP when running the tests.
As mentioned in the bug report above a workaround is to add
browser.resetUrl = 'about:blank';to the onPrepare function as done for example here.