Sponsored Content
Operating Systems OS X (Apple) Are you sure you want to quit Safari? Post 303032397 by Neo on Saturday 16th of March 2019 01:10:25 AM
Old 03-16-2019
Yeah, thanks.

I had a similar issue recently when my automatic 2AM scheduled shutdown of the MacPro happens with the Terminal app open. I would wake up and see the Mac was in "do you really want to quit the terminal" mode and not shut down (man, I hate that .. LOL), but I found a preferences option to avoid this problem.

Now, when testing web dev apps in Safari, especially on login and registration pages where there are passwords to save, Safari will also stop an automatic shutdown. That's annoying for sure.

This 12 core MacPro uses so much electricity and generates a lot of heat. I don't like it when it runs all night when sleeping, so auto shutdown is a great feature; but now Safari is blocking.

It's not a big deal.

The reason I am using Safari so much these days is that Safari always clears the Javascript cache out "completely" (when I quit and restart the browser) when I am testing live versions of the new CP. I noticed that Opera and Firefox are really troublesome at clearing out the JS cache, even when I quit the browser completely; and Chrome is better but not much. Safari is really great about this. FF and Opera the worst. Chrome is in between. I don't have time to figure out why; but I guess it's some user configuration switch in Chrome I am missing.

So, I develop on Chrome and test live on the web site with Safari to save time, and that is why I'm noticing all these Safari quirks.

After I get past this major Vue.js UserCP project, I'll use Safari less and I will not notice it again.

For those interested, all the Vue.js Javascript development in done on MacOS using node.js and node package manager (npm)).. and node.js is built on the amazing Google Chrome V8 Javascript engine; and so I think this is one reason why Chrome works so great with modern web apps, since almost all current state-of-the-art web apps are built using node.js and V8 is core.

Frankly as a developer, If I tried to develop (anything state-of-the-art) on Firefox or Opera, I would get very little done and be miserable, LOL. Those browsers are really falling behind in 2019 and I am quite sure their downward spiral will continue because Chrome is focused on modern web apps and Firefox is focused on "privacy" and seeming trying to block modern web apps. This is fight which FF will lose for sure with developers. Safari works fine. Opera, well, I open it from time to time, but never use it for anything "useful" from a web dev perspective.

Drifting off topic again......



Cheers.
 
SAFARIDRIVER(1) 					    BSD General Commands Manual 					   SAFARIDRIVER(1)

NAME
safaridriver -- Safari WebDriver REST API service SYNOPSIS
safaridriver -p port [-h | --help] [--enable] DESCRIPTION
The safaridriver utility is used to launch an HTTP server that implements the Selenium WebDriver REST API. When launched, safaridriver allows for automated testing of web content using the version of Safari that is installed with macOS. safaridriver supports several capabilities that can customize an automation session's behavior for a particular testing purpose. Capabilities are provided as arguments when requesting a new session. The capabilities supported by safaridriver are listed in the OPTIONS section below. Unless noted below, the values of requested capability keys are not read and are assumed to be true if present, and false otherwise. To use capabilities in your tests, please refer to the relevant 3rd-party documentation to learn how to request extra capabilities with the WebDriver client library that you are using. OPTIONS
Command line options -p, --port <port> Specifies the port on which the HTTP server should listen for incoming connections. If the port is already in use or otherwise unavailable, safaridriver will exit immediately with a non-zero return code. -h, --help Prints a usage message and exits. --enable Applies configuration changes so that subsequent WebDriver sessions will run without further authentication. This includes turning on Safari's Develop menu and checking "Enable Remote Automation" in the Develop menu. The user must authenticate via password for the changes to be applied. When this option is specified, safaridriver exits immediately without starting up the REST API service. If the changes were success- ful or already applied, safaridriver exits 0; otherwise, safaridriver exits >0 and prints an error message to stderr. Available capabilities safari:automaticInspection This capability instructs Safari to preload the Web Inspector and JavaScript debugger in the background prior to returning a newly- created window. To pause the test's execution in JavaScript and bring up Web Inspector's Debugger tab, you can simply evaluate a debugger; statement in the test page. safari:automaticProfiling This capability instructs Safari to preload the Web Inspector and start a Timeline recording in the background prior to returning a newly-created window. To view the recording, open the Web Inspector through Safari's Develop menu. webkit:WebRTC This capability allows a test to temporarily change Safari's policies for WebRTC and Media Capture. The value of the webkit:WebRTC capability is a dictionary with the following sub-keys, all of which are optional: DisableInsecureMediaCapture Normally, Safari refuses to allow media capture over insecure connections. This capability suppresses that restriction for testing purposes. For example, it would allow a test to exercise media capture code paths using a local test web server that is not configured to use HTTPS. DisableICECandidateFiltering To protect a user's privacy, Safari normally filters out WebRTC ICE candidates that correspond to internal network addresses when capture devices are not in use. This capability suppresses ICE candidate filtering so that both internal and external network addresses are always sent as ICE candidates. NOTES
For security reasons, the HTTP server accepts connections from localhost only. The HTTP server can accept connections from multiple test clients. Currently, only one Safari may be automated at a time, so it is not recommended to run multiple safaridriver instances at the same time. safaridriver is typically executed manually at the command line or automatically by a WebDriver client library. The Selenium project provides client libraries for most popular programming languages. More information is available on the Selenium project website: https://www.seleniumhq.org/ SEE ALSO
A summary of which REST API endpoints safaridriver supports, as well as the Safari version in which each endpoint became available, can be found on the Apple Developer website: https://developer.apple.com/ DIAGNOSTICS
The safaridriver utility exits 0 on success, and >0 if an error occurs. When a REST API command fails, safaridriver includes a detailed error message in the response. If you use a 3rd-party library on top of the REST API service, consult the library's documentation for how to access these error messages. STANDARDS
safaridriver implements the Selenium WebDriver JSON Wire Protocol as described by the Selenium WebDriver test suites and the protocol summary published here: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol Darwin May 31, 2019 Darwin
All times are GMT -4. The time now is 06:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy