企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/hide-keyboard.yml) # 隐藏键盘 隐藏软键盘 [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/hide-keyboard.yml) ## 使用样例 ```java // Java driver.hideKeyboard(); ``` ```python # Python self.driver.hide_keyboard() ``` ```javascript // Javascript // webdriver.io example driver.hideKeyboard(); // wd example await driver.hideDeviceKeyboard(); ``` ```ruby # Ruby # ruby_lib example hide_keyboard # ruby_lib_core example @driver.hide_keyboard ``` ```php # PHP $driver->hideKeyboard(); $driver->hideKeyboard(array( 'keyName' => 'Done' )); ``` ```csharp // C# driver.HideKeyboard(); ``` [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/hide-keyboard.yml) ## 支持 [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/hide-keyboard.yml) ### Appium Server |平台|驱动|平台版本|Appium 版本| 驱动版本| |--------|----------------|------|--------------|--------------| | iOS | [XCUITest](../drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All | | | [UIAutomation](../drivers/ios-uiautomation.md) | 8.0 to 9.3 | All | All | | 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) | 10+ | 1.6.0+ | All | [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/hide-keyboard.yml) ### Appium Clients |语言|支持|文档| |--------|-------|-------------| |[Java](https://github.com/appium/java-client/releases/latest)| All | [appium.github.io](https://appium.github.io/java-client/io/appium/java_client/HidesKeyboard.html#hideKeyboard--) | |[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.keyboard.Keyboard.hide_keyboard) | |[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#L2723) | |[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#hide_keyboard-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/blob/master/src/Appium.Net/Appium/AppiumDriver.cs) | [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/hide-keyboard.yml) ## HTTP API 规范 [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/hide-keyboard.yml) ### 端口 `POST /session/:session_id/appium/device/hide_keyboard` [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/hide-keyboard.yml) ### URL 参数 |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/keys/hide-keyboard.yml) ### JSON 参数 |name|type|description| |----|----|-----------| | strategy | `string` | 隐藏键盘策略(可选,仅UIAutomation)。 可用策略-'press','pressKey','swipeDown','tapOut','tapOutside','default'. | | key | `string` | Key (可选) | | keyCode | `string` | Key code (可选) | | keyName | `string` | Key name (可选) | [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/hide-keyboard.yml) ### 响应 null [//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/hide-keyboard.yml) ## 参考 * [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L495)