diff --git a/docs/mjsonwp/protocol-methods.md b/docs/mjsonwp/protocol-methods.md index a0155b84b..89e336dab 100644 --- a/docs/mjsonwp/protocol-methods.md +++ b/docs/mjsonwp/protocol-methods.md @@ -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. diff --git a/lib/mjsonwp/routes.js b/lib/mjsonwp/routes.js index 7715b5eaa..c256f5d34 100644 --- a/lib/mjsonwp/routes.js +++ b/lib/mjsonwp/routes.js @@ -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']}} }, diff --git a/test/mjsonwp/routes-specs.js b/test/mjsonwp/routes-specs.js index 5b952b818..f20f501eb 100644 --- a/test/mjsonwp/routes-specs.js +++ b/test/mjsonwp/routes-specs.js @@ -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'); }); });