Files
runner-images/images/macos/scripts/build/install-safari.sh
Alexey-Ayupov 5a6e215859 [macOS] Refactor the rest of the scripts (#9113)
* [macOS] Refactor the rest of the scripts

* Return quotes to config tccdb script

* Return quotes to config tccdb script

* Revert some changes in ruby scripts

* Revert some changes in ruby scripts

* Revert some changes chrome script

* check errors

* check errors 01

* find errors in common-utils

* find errors in edge install

* find errors in edge install

---------

Co-authored-by: Alexey Ayupov <“alexey.ayupov@akvelon.com”>
2024-01-09 14:47:31 +01:00

21 lines
959 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash -e -o pipefail
################################################################################
## File: install-safari.sh
## Desc: Install Safari browser
################################################################################
echo "Enabling safari driver..."
# https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari
# Safaris executable is located at /usr/bin/safaridriver
# Configure Safari to Enable WebDriver Support
sudo safaridriver --enable
echo "Enabling the 'Allow Remote Automation' option in Safari's Develop menu"
mkdir -p $HOME/Library/WebDriver
safari_plist="$HOME/Library/WebDriver/com.apple.Safari.plist"
# "|| true" is needed to suppress exit code 1 in case if property or file doesn't exist
/usr/libexec/PlistBuddy -c 'delete AllowRemoteAutomation' $safari_plist || true
/usr/libexec/PlistBuddy -c 'add AllowRemoteAutomation bool true' $safari_plist
invoke_tests "Browsers" "Safari"