Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Safari 12 refuses to parse dataURLs #4964

@chrisguttandin

Description

@chrisguttandin

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 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions