add commands of power ac and power capacity
ADD
commands-yml/commands/device/emulator/power_ac.yml
+---
+name: Emulate power state
+short_description: Emulate power state change on the connected emulator.
+
+description:
+ |
+ For Android emulator.
+ To set the state of the battery charger to connected or not.
+
+example_usage:
+ java:
+ |
+ driver.setPowerAC(PowerACState.OFF);
+ ruby:
+ |
+ @driver.set_power_ac :on
+
+client_docs:
+ java: "http://appium.github.io/java-client/" # TODO: Link
+ ruby: "https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Android/Device/Emulator#set_power_ac-instance_method"
+
+# Driver support by platform
+driver_support:
+ ios:
+ xcuitest: false
+ uiautomation: false
+ android:
+ uiautomator2: true
+ uiautomator: true
+ mac:
+ mac: false
+ windows:
+ windows: false
+client_support:
+ java: true
+ python: false
+ ruby: true
+ php: false
+ csharp: false
+ javascript_wd: false
+ javascript_wdio: false
+
+
+# Information about the HTTP endpoints
+endpoint:
+ url: /session/:session_id/appium/device/power_ac
+ method: 'POST'
+ url_parameters:
+ - name: session_id
+ description: ID of the session to route the command to
+ json_parameters:
+ - name: state
+ type: string
+ description: set the state. on or off
+
+# Links to specifications. Should link to at least one specification
+specifications:
+ jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L381

ADD
commands-yml/commands/device/emulator/power_capacity.yml
+---
+name: Emulate power capacity
+short_description: Emulate power capacity change on the connected emulator.
+
+description:
+ |
+ For Android emulator.
+ To set the battery percentage.
+
+example_usage:
+ java:
+ |
+ driver.setPowerCapacity(100);
+ ruby:
+ |
+ @driver.set_power_capacity 50
+
+client_docs:
+ java: "http://appium.github.io/java-client/" # TODO: Link
+ ruby: "https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Android/Device/Emulator#set_power_capacity-instance_method"
+
+# Driver support by platform
+driver_support:
+ ios:
+ xcuitest: false
+ uiautomation: false
+ android:
+ uiautomator2: true
+ uiautomator: true
+ mac:
+ mac: false
+ windows:
+ windows: false
+client_support:
+ java: true
+ python: false
+ ruby: true
+ php: false
+ csharp: false
+ javascript_wd: false
+ javascript_wdio: false
+
+# Information about the HTTP endpoints
+endpoint:
+ url: /session/:session_id/appium/device/power_capacity
+ method: 'POST'
+ url_parameters:
+ - name: session_id
+ description: ID of the session to route the command to
+ json_parameters:
+ - name: percent
+ type: integer
+ description: ercentage value in range [0, 100]
+
+# Links to specifications. Should link to at least one specification
+specifications:
+ jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L378

MODIFY
docs/en/commands/device/app/close-app.md
docs/en/commands/device/app/close-app.md
@@ -18,7 +18,7 @@ self.driver.close_app()
```javascript
// Javascript
// webdriver.io example
-driver.closeApp();
+driver.close_app();

ADD
docs/en/commands/device/emulator/power_ac.md
+# Emulate power state
+
+Emulate power state change on the connected emulator.
+## Example Usage
+
+```java
+// Java
+driver.setPowerAC(PowerACState.OFF);
+
+```
+
+```python
+# Not supported
+```
+
+```javascript
+// Not supported
+
+
+// Not supported
+```
+
+```ruby
+# Ruby
+@driver.set_power_ac :on
+
+```
+
+```php
+// Not supported
+```
+
+```csharp
+// Not supported
+```
+
+
+## Description
+
+For Android emulator.
+To set the state of the battery charger to connected or not.
+
+
+## Support
+
+### Appium Server
+
+|Platform|Driver|Platform Versions|Appium Version|Driver Version|
+|--------|----------------|------|--------------|--------------|
+| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | None | None | None |
+| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | None | None | None |
+| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
+| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
+| Mac | [Mac](/docs/en/drivers/mac.md) | None | None | None |
+| Windows | [Windows](/docs/en/drivers/windows.md) | None | None | None |
+
+### Appium Clients
+
+|Language|Support|Documentation|
+|--------|-------|-------------|
+|[Java](https://github.com/appium/java-client/releases/latest)| All | [appium.github.io](http://appium.github.io/java-client/) |
+|[Python](https://github.com/appium/python-client/releases/latest)| None | |
+|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| None | |
+|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| None | |
+|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Android/Device/Emulator#set_power_ac-instance_method) |
+|[PHP](https://github.com/appium/php-client/releases/latest)| None | |
+|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | |
+
+## HTTP API Specifications
+
+### Endpoint
+
+`POST /session/:session_id/appium/device/power_ac`
+
+### URL Parameters
+
+|name|description|
+|----|-----------|
+|session_id|ID of the session to route the command to|
+
+### JSON Parameters
+
+|name|type|description|
+|----|----|-----------|
+| state | `string` | set the state. on or off |
+
+### Response
+
+null
+
+## See Also
+
+* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L381)

ADD
docs/en/commands/device/emulator/power_capacity.md
+# Emulate power capacity
+
+Emulate power capacity change on the connected emulator.
+## Example Usage
+
+```java
+// Java
+driver.setPowerCapacity(100);
+
+```
+
+```python
+# Not supported
+```
+
+```javascript
+// Not supported
+
+
+// Not supported
+```
+
+```ruby
+# Ruby
+@driver.set_power_capacity 50
+
+```
+
+```php
+// Not supported
+```
+
+```csharp
+// Not supported
+```
+
+
+## Description
+
+For Android emulator.
+To set the battery percentage.
+
+
+## Support
+
+### Appium Server
+
+|Platform|Driver|Platform Versions|Appium Version|Driver Version|
+|--------|----------------|------|--------------|--------------|
+| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | None | None | None |
+| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | None | None | None |
+| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
+| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
+| Mac | [Mac](/docs/en/drivers/mac.md) | None | None | None |
+| Windows | [Windows](/docs/en/drivers/windows.md) | None | None | None |
+
+### Appium Clients
+
+|Language|Support|Documentation|
+|--------|-------|-------------|
+|[Java](https://github.com/appium/java-client/releases/latest)| All | [appium.github.io](http://appium.github.io/java-client/) |
+|[Python](https://github.com/appium/python-client/releases/latest)| None | |
+|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| None | |
+|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| None | |
+|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Android/Device/Emulator#set_power_capacity-instance_method) |
+|[PHP](https://github.com/appium/php-client/releases/latest)| None | |
+|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | |
+
+## HTTP API Specifications
+
+### Endpoint
+
+`POST /session/:session_id/appium/device/power_capacity`
+
+### URL Parameters
+
+|name|description|
+|----|-----------|
+|session_id|ID of the session to route the command to|
+
+### JSON Parameters
+
+|name|type|description|
+|----|----|-----------|
+| percent | `integer` | ercentage value in range [0, 100] |
+
+### Response
+
+null
+
+## See Also
+
+* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L378)

MODIFY
docs/en/commands/element/attributes/text.md
docs/en/commands/element/attributes/text.md
@@ -26,7 +26,7 @@ driver.getText("~SomeAccessibilityId");
// wd example
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
-await element.submit();
+await element.text();
```

add commands of power ac and power capacity (#10253)