mirror of
https://github.com/appium/appium.git
synced 2026-10-28 20:31:51 +08:00
add apis to read capability data
This commit is contained in:
@@ -109,6 +109,8 @@ POST | `/wd/hub/session/{sessionId}/appium/device/shake`
|
||||
POST | `/wd/hub/session/{sessionId}/appium/device/lock` | Lock the device.
|
||||
POST | `/wd/hub/session/{sessionId}/appium/device/unlock` | Unlock the device.
|
||||
POST | `/wd/hub/session/{sessionId}/appium/device/is_locked` | Check whether the device is locked or not.
|
||||
POST | `/wd/hub/session/{sessionId}/appium/performanceData/types` | returns the information types of the system state which is supported to read as like cpu, memory, network traffic, and battery.
|
||||
POST | `/wd/hub/session/{sessionId}/appium/getPerformanceData` | returns the information of the system state which is supported to read as like cpu, memory, network traffic, and battery.
|
||||
POST | `/wd/hub/session/{sessionId}/appium/device/press_keycode` | Press a particular key code on the device.
|
||||
POST | `/wd/hub/session/{sessionId}/appium/device/long_press_keycode` | Press and hold a particular key code on the device.
|
||||
POST | `/wd/hub/session/{sessionId}/appium/device/keyevent` | Send a key code to the device.
|
||||
|
||||
@@ -297,6 +297,12 @@ const METHOD_MAP = {
|
||||
'/wd/hub/session/:sessionId/appium/device/is_locked': {
|
||||
POST: {command: 'isLocked'}
|
||||
},
|
||||
'/wd/hub/session/:sessionId/appium/performanceData/types': {
|
||||
POST: {command: 'getPerformanceDataTypes'}
|
||||
},
|
||||
'/wd/hub/session/:sessionId/appium/getPerformanceData': {
|
||||
POST: {command: 'getPerformanceData', payloadParams: {required: ['applicationPackageName', 'performanceDataType']}}
|
||||
},
|
||||
'/wd/hub/session/:sessionId/appium/device/press_keycode': {
|
||||
POST: {command: 'pressKeyCode', payloadParams: {required: ['keycode'], optional: ['metastate']}}
|
||||
},
|
||||
|
||||
@@ -38,7 +38,7 @@ describe('MJSONWP', () => {
|
||||
}
|
||||
var hash = shasum.digest('hex').substring(0, 8);
|
||||
// Modify the hash whenever the protocol has intentionally been modified.
|
||||
hash.should.equal('17acd488');
|
||||
hash.should.equal('5b035b99');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user