mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
[macOS] Rename build scripts (#8887)
Co-authored-by: Alexey Ayupov <“alexey.ayupov@akvelon.com”>
This commit is contained in:
20
images/macos/scripts/build/install-safari.sh
Normal file
20
images/macos/scripts/build/install-safari.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/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
|
||||
# Safari’s 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"
|
||||
Reference in New Issue
Block a user