ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml) # Activate App Activate the given app onto the device [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml) ## Example Usage ```java // Java driver.activateApp('com.apple.Preferences'); driver.activateApp('io.appium.android.apis'); ``` ```python # Python driver.activate_app('com.apple.Preferences') driver.activate_app('io.appium.android.apis') ``` ```javascript // Javascript // webdriver.io example driver.activateApp(null, 'com.apple.Preferences') driver.activateApp('io.appium.android.apis') // wd example // Supports only `mobile: queryAppState` for iOS, XCUITest ``` ```ruby # Ruby # ruby_lib example activate_app('com.apple.Preferences') activate_app('io.appium.android.apis') # ruby_lib_core example @driver.activate_app('com.apple.Preferences') @driver.activate_app('io.appium.android.apis') ``` ```php # PHP // Supports only `mobile: queryAppState` for iOS, XCUITest ``` ```csharp // C# driver.activateApp('com.apple.Preferences'); driver.activateApp('io.appium.android.apis'); ``` [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml) ## Description iOS tests with XCUITest can also use the `mobile: activateApp` method. See detailed [documentation](http://appium.io../../writing-running-appium/ios/ios-xctest-mobile-apps-management/index.html#mobile-activateapp). [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml) ## Support [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml) ### Appium Server |Platform|Driver|Platform Versions|Appium Version|Driver Version| |--------|----------------|------|--------------|--------------| | iOS | [XCUITest](../../drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All | | | [UIAutomation](../../drivers/ios-uiautomation.md) | None | None | None | | Android | [Espresso](../../drivers/android-espresso.md) | ?+ | 1.9.0+ | All | | | [UiAutomator2](../../drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All | | | [UiAutomator](../../drivers/android-uiautomator.md) | 4.3+ | All | All | | Mac | [Mac](../../drivers/mac.md) | None | None | None | | Windows | [Windows](../../drivers/windows.md) | None | None | None | [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml) ### Appium Clients |Language|Support|Documentation| |--------|-------|-------------| |[Java](https://github.com/appium/java-client/releases/latest)| All | [appium.github.io](https://appium.github.io/java-client/io/appium/java_client/InteractsWithApps.html#activateApp-java.lang.String-) | |[Python](https://github.com/appium/python-client/releases/latest)| All | [appium.github.io](https://appium.github.io/python-client-sphinx/webdriver.extensions.html#webdriver.extensions.applications.Applications.activate_app) | |[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | | |[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js) | |[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#activate_app-instance_method) | |[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) | |[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) | [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml) ## HTTP API Specifications [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml) ### Endpoint `POST /session/:session_id/appium/device/activate_app` [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml) ### URL Parameters |name|description| |----|-----------| |session_id|ID of the session to route the command to| [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml) ### JSON Parameters |name|type|description| |----|----|-----------| | bundleId or appId | `string` | BundleId for iOS. Package name for Android. | [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml) ### Response null [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml) ## See Also * [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L445)