Skip to content

Commit 097efee

Browse files
committed
chore: add action that will click Allow button during podman installation on Mac
Signed-off-by: Ondrej Dockal <[email protected]>
1 parent 827713c commit 097efee

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

test/extended/podman-desktop/extension/podman/podman-extension_darwin.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ const (
1111
installerBundleID = "com.apple.installer"
1212
installerPodmanTitle = "Install Podman"
1313

14-
installerContinue = "Continue"
15-
installerAgree = "Agree"
16-
installerInstall = "Install"
17-
installerClose = "Close"
14+
installerContinue = "Continue"
15+
installerAgree = "Agree"
16+
installerAllow = "Allow"
17+
installerInstall = "Install"
18+
installerClose = "Close"
1819

1920
installerSelectLocationTitle = "Select a Destination"
2021
)
@@ -49,6 +50,13 @@ func runInstaller(userPassword string) error {
4950
if err := i.Click(installerAgree, delay.SMALL); err != nil {
5051
return installerError(err)
5152
}
53+
// get foreground App (Just a system dialog, contains buttons Allow and Don't Allow)
54+
y, err := ax.GetForefront()
55+
if err := y.Click(installerAllow, delay.SMALL); err != nil {
56+
return installerError(err)
57+
}
58+
// reinitilize installer app
59+
i, err := ax.GetAppByTypeAndTitle(installerBundleID, installerPodmanTitle)
5260
if selectLocationExists, err := i.ExistsWithType(installerSelectLocationTitle, "text"); selectLocationExists {
5361
if err != nil {
5462
return installerError(err)

0 commit comments

Comments
 (0)