Quantcast
Channel: How to disable "Warn before quitting" in Chrome using Java/Selenium? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by sarimarton for How to disable "Warn before quitting" in Chrome using Java/Selenium?

$
0
0

This bothered me as well. It seems like there's no such entry for it in the Chrome Preferences JSON, I assume because it's a macOS-only feature. I've resolved this by creating a Karabiner Elements config which selects the Quit menu item on Command-Q in Chrome. Here's the config in YAML:

- manipulators:  - from:      key_code: q      modifiers:        mandatory:          - command    to:      - shell_command: >-          osascript          -e 'tell application "Google Chrome for Testing" to activate'          -e 'tell application "System Events"'          -e '  tell process "Google Chrome for Testing"'          -e '    click menu item "Quit Chromium" of menu "Google Chrome for Testing" of menu bar 1'          -e '  end tell'          -e 'end tell'    conditions:      - type: frontmost_application_if        bundle_identifiers:          - chrome.for.testing    type: basic

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>