-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Safari Technology Preview can't find Angular 1 #4004
Comments
Well, that's not good. |
On the other hand, it has if (navigator.webdriver) {
window.name = "NG_DEFER_BOOTSTRAP!" + window.name;
} before calling |
So, the root issue with Safari is "window.name leaks information across domains". Which is true, this is the exact property that Protractor exploits to tell Angular that it's in an E2E test before the browser navigates to the page. The only way I can see to fix this would be to implement @sjelin's plan for handling browser-initiated navigation, but even that wouldn't totally fix things. Fundamentally, Protractor depends on some form of cross-domain information leaking so it can signal to Angular that it's running in a test. The alternative would be to load the app (or any page on that domain, I guess) and set something in sessionStore, then reload the app for testing. Alternately, Protractor could use a proxy to inject javascript before the app loads. |
This appears to be an issue now in Chrome 63 (which is in the beta channel) as well |
@heathkit I think this is going to become a much more prevalent issue very soon... |
Any news about this issue? We have an Angular 1 app and we basically cannot run our tests for Safari, which represents a great portion of our user base. Can we conclude that Protractor does not work with Safari 11 for Angular 1 app? Any workaround or short term solution planned? Many thanks in advance! |
@flo223 I wrote what my workaround was. Does it not work for you? |
@thorn0 where did you place your |
@GiovanyR Before the |
@thorn0 : Do you have an example where i can look? I'm trying a possible solution that could be written inside the protractor configuration file. |
@evilaliv3 It can't be written there. It's something you need to do in the app code before bootstrapping AngularJS. I didn't touch those things for years and have no idea whether that workaround still works. |
This same breakage also occurs in Firefox 86 |
There's an intent to similarly break this in Chromium. Do y'all have plans to stop relying on |
@yoavweiss not at this time. We need to come up with some... |
Starting with the Release 19, Safari Technology Preview is incompatible with Protractor.
See https://webkit.org/blog/7093/release-notes-for-safari-technology-preview-19/:
So if we try to test an Angular 1 app there, we get
angular never provided resumeBootstrap
.I wish we didn't need the Preview in the first place and could just use the release version of Safari 10, but the web driver implementation in the release is broken. Specifically, visibility checks aren't implemented in it, which has been fixed in the preview.
Protractor 4.0.14 (tried 5.0.0 too), Node 6.9,4, Selenium Standalone Server 3.0.1, macOS 10.12
The text was updated successfully, but these errors were encountered: