-
-
Notifications
You must be signed in to change notification settings - Fork 30
New methods proposal #6
base: master
Are you sure you want to change the base?
Changes from 7 commits
2374122
9f3e96a
52fd1e3
230c3d1
a832a07
be39e92
be4ad07
f5cc541
525eb16
650a9b0
ef3ae0c
90fa797
f0f4ac5
b91d765
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -272,10 +272,65 @@ as follows: | |
* The virtual keyboard: use sendKeys | ||
* acceleromator: TODO @mdas is working on this | ||
* geolocation: use regular webdriver endpoints | ||
* battery level: not in spec, perhaps exposed via executeScript | ||
* network speed: not in spec, perhaps exposed via executeScript | ||
|
||
|
||
Battery | ||
------- | ||
Device battery changes might trigger events on users applications, controlling this will help monitor and verify how apps responds to these factors. | ||
|
||
The battery state should have two options: ON, OFF depending if the power ac state it's charging or not. | ||
|
||
* GET /session/:sessionId/appium/device/battery_state | ||
* returns BatteryState | ||
|
||
|
||
* POST /session/:sessionId/appium/device/battery_state | ||
* accepts BatteryState | ||
|
||
|
||
A `BatteryState` can be one of two strings: | ||
* ON | ||
* OFF | ||
|
||
In some cases, apps might respond different on low battery level so the idea is to provide a method to set specific battery level for the devices. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe mention that this is percent? and should we state that it is a range of integers (rather than real values?). |
||
|
||
* GET /session/:sessionId/appium/device/battery_level | ||
* returns [0..100] | ||
|
||
* POST /session/:sessionId/appium/device/battery_level | ||
* accepts [0..100] | ||
|
||
|
||
External communication factors | ||
------------------------------ | ||
Receiving messages or phone calls it's usual on mobile devices, having the possibility to mock this events would improve the application reaction on this external factors. | ||
|
||
### Phone calls(GSM) | ||
The idea is to be able to mock phone calls entering the device and handle the actions that triggers; you may want to accept it, cancel or put it on hold. | ||
|
||
* POST /session/:sessionId/appium/device/gsm_call | ||
* accepts PhoneNumber, GsmAction | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how are these parameters passed? is it something like: {"number": <PhoneNumber>, "action": <GsmAction>} ? |
||
|
||
|
||
`GsmAction`'s would be: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mention that these are strings? |
||
|
||
* CALL | ||
* ACCEPT | ||
* CANCEL | ||
* HOLD | ||
|
||
The `CALL` action should trigger the mocked call to the device from the `PhoneNumber` provided, then another action should take place in order to complete the flow as in real life. | ||
|
||
|
||
### SMS | ||
During this days a lot of apps depend on receiving sms, even if they are not messaging platform, apps may want to check sms to validate accounts, send promotion codes, etc. We should add | ||
|
||
* POST /session/:sessionId/appium/device/sms_send | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think just |
||
* accepts PhoneNumber, Message | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is |
||
|
||
|
||
|
||
WebViews and Other Contexts | ||
--------------------------- | ||
One common feature of mobile platforms is the ability to embed a chromeless | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here and in all the following, we don't need
appium/device
in the endpoint. this spec draft is a draft of what would potentially be an official spec at some point. theappium/
prefix is for appium-specific functionality that would not be a part of this draft. or if we wanted to implement this in appium before its admission into the draft.so i would recommend one of these two:
if we have enough things to put behind
/device
that could be a reasonable global prefix