Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enable Safari settings modification for real devices #2373

Merged
merged 7 commits into from
Mar 31, 2024

Conversation

mykola-mokhnach
Copy link
Contributor

I got this idea after reading https://sarunw.com/posts/how-to-set-userdefaults-value-with-launch-arguments/

Basically, Safari settings are just entries in NSUserDefaults, so they could theoretically be changed via command line args, like for any other iOS or macOS app. This limits the scope for real devices in comparison to simulators, where we could change app defaults in runtime (on real devices the app must be started new to apply command line args), but something is anyway better than nothing 🎉

@KazuCocoa
Copy link
Member

Interesting to find, didn't know of that. I'll test with a real device

@mykola-mokhnach
Copy link
Contributor Author

@KazuCocoa Please update your local branch if you have already started the testing. I've found some issues there recently

@KazuCocoa
Copy link
Member

Sure. I'll have time to do test tonight

Copy link
Member

@KazuCocoa KazuCocoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

Tested with safariAllowPopups and

url = "http://the-internet.herokuapp.com/redirector"
driver.get url
e = driver.find_element :css, "[target='_blank']"
e.click

Potentially some may not work, but at least the caps worked

@mykola-mokhnach mykola-mokhnach merged commit 2bf1dc5 into appium:master Mar 31, 2024
18 checks passed
@mykola-mokhnach mykola-mokhnach deleted the real_safari branch March 31, 2024 07:10
github-actions bot pushed a commit that referenced this pull request Mar 31, 2024
## [7.9.0](v7.8.2...v7.9.0) (2024-03-31)

### Features

* Enable Safari settings modification for real devices ([#2373](#2373)) ([2bf1dc5](2bf1dc5))
Copy link
Contributor

🎉 This PR is included in version 7.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants