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: add mobile:simctl to run listed simctl subcommands #2461

Merged
merged 22 commits into from
Aug 31, 2024
Merged

Conversation

KazuCocoa
Copy link
Member

@KazuCocoa KazuCocoa commented Aug 29, 2024

appium/appium#20481

Let users call an arbitrary subcommand of simctl which accepts device argument as the first argument to specify a device.

> d.execute_script 'mobile:simctl', {command: 'getenv', args: ['HOME']}
=> {"stdout"=>"/Users/kazu/Library/Developer/CoreSimulator/Devices/60EB8FDB-92E0-4895-B466-0153C6DE7BAE/data\n",
 "stderr"=>"",
 "code"=>0}
> d.execute_script 'mobile:simctl', {command: 'getenv', args: ['HOME'], timeout: 10}
Selenium::WebDriver::Error::UnknownError: An unknown server-side error occurred while processing the command. Original error: Command '/usr/bin/xcrun simctl getenv 60EB8FDB-92E0-4895-B466-0153C6DE7BAE HOME' timed out after 10ms
from /Users/kazu/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/selenium-webdriver-4.23.0/lib/selenium/webdriver/remote/response.rb:62:in `add_cause'
Caused by Selenium::WebDriver::Error::WebDriverError: 
from UnknownError: An unknown server-side error occurred while processing the command. Original error: Command '/usr/bin/xcrun simctl getenv 60EB8FDB-92E0-4895-B466-0153C6DE7BAE HOME' timed out after 10ms
    at getResponseForW3CError (/Users/kazu/.nvm/versions/node/v16.20.2/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:1145:9)
    at asyncHandler (/Users/kazu/.nvm/versions/node/v16.20.2/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/protocol.js:491:57)

@KazuCocoa

This comment was marked as outdated.

@KazuCocoa KazuCocoa marked this pull request as ready for review August 31, 2024 04:55
@KazuCocoa KazuCocoa marked this pull request as draft August 31, 2024 16:47
@KazuCocoa KazuCocoa marked this pull request as ready for review August 31, 2024 17:00
@KazuCocoa KazuCocoa changed the title feat: add mobile:simctl to run an arbitrary simctl subcommand under a security flag feat: add mobile:simctl to run listed simctl subcommands Aug 31, 2024
@KazuCocoa KazuCocoa merged commit 6aac043 into master Aug 31, 2024
18 checks passed
@KazuCocoa KazuCocoa deleted the simctl branch August 31, 2024 21:23
github-actions bot pushed a commit that referenced this pull request Aug 31, 2024
## [7.25.0](v7.24.18...v7.25.0) (2024-08-31)

### Features

* add mobile:simctl to run listed simctl subcommands ([#2461](#2461)) ([6aac043](6aac043))
Copy link
Contributor

🎉 This issue has been resolved in version 7.25.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