From 23741223d7a18e97a2e1598632bc2db10300ee58 Mon Sep 17 00:00:00 2001 From: vrunoa Date: Sun, 4 Jun 2017 20:38:40 -0300 Subject: [PATCH 01/14] add mobile methods --- spec-draft.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec-draft.md b/spec-draft.md index cd71363..a6fc29c 100644 --- a/spec-draft.md +++ b/spec-draft.md @@ -273,7 +273,10 @@ as follows: * acceleromator: TODO @mdas is working on this * geolocation: use regular webdriver endpoints * battery level: not in spec, perhaps exposed via executeScript +* battery status: not in spec, perhaps exposed via executeScript * network speed: not in spec, perhaps exposed via executeScript +* send sms: not in spec, perhaps exposed via executeScript +* phone calls: not in spec, perhaps exposed via executeScript WebViews and Other Contexts From 9f3e96aac670167d096e7197d09c5c866f1506ae Mon Sep 17 00:00:00 2001 From: vrunoa Date: Wed, 7 Jun 2017 12:54:18 -0300 Subject: [PATCH 02/14] write battery spec --- spec-draft.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/spec-draft.md b/spec-draft.md index a6fc29c..156af52 100644 --- a/spec-draft.md +++ b/spec-draft.md @@ -272,11 +272,21 @@ 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 -* battery status: not in spec, perhaps exposed via executeScript * network speed: not in spec, perhaps exposed via executeScript -* send sms: not in spec, perhaps exposed via executeScript -* phone calls: not in spec, perhaps exposed via executeScript + + +Battery +------- +Device battery changes it's a factor that might trigger events on users applications, controlling this will help to monitor and verify how apps responds to these factors. + +The battery status should have two states: charging or not-charging. 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. + + +External communication factors +------------------------------ +# TODO - write proposal +* receive sms: +* receive phone calls: WebViews and Other Contexts From 52fd1e3ddca6f2da6569cd8c61662b1d4d2271d4 Mon Sep 17 00:00:00 2001 From: vrunoa Date: Wed, 7 Jun 2017 13:33:04 -0300 Subject: [PATCH 03/14] add communication factors --- spec-draft.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spec-draft.md b/spec-draft.md index 156af52..75acaae 100644 --- a/spec-draft.md +++ b/spec-draft.md @@ -277,16 +277,14 @@ as follows: Battery ------- -Device battery changes it's a factor that might trigger events on users applications, controlling this will help to monitor and verify how apps responds to these factors. +Device battery changes might trigger events on users applications, controlling this will help monitor and verify how apps responds to these factors. The battery status should have two states: charging or not-charging. 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. External communication factors ------------------------------ -# TODO - write proposal -* receive sms: -* receive phone calls: +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. WebViews and Other Contexts From 230c3d1a86112b10d99192191359b68a16881052 Mon Sep 17 00:00:00 2001 From: vrunoa Date: Thu, 15 Jun 2017 16:34:24 -0300 Subject: [PATCH 04/14] add battery endpoints --- spec-draft.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/spec-draft.md b/spec-draft.md index 75acaae..858eaa7 100644 --- a/spec-draft.md +++ b/spec-draft.md @@ -279,7 +279,24 @@ 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 status should have two states: charging or not-charging. 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. +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. + +* POST /session/:sessionId/appium/device/battery_level + * accepts [0..100] External communication factors From a832a07b5b0de4aa429a966dd1e76bcf5ec1c781 Mon Sep 17 00:00:00 2001 From: vrunoa Date: Thu, 15 Jun 2017 21:53:59 -0300 Subject: [PATCH 05/14] add sms, phone endpoints --- spec-draft.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/spec-draft.md b/spec-draft.md index 858eaa7..a34678c 100644 --- a/spec-draft.md +++ b/spec-draft.md @@ -303,6 +303,33 @@ 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 + + +`GsmAction`'s would be: + +* 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 + * accepts PhoneNumber, Message + + + WebViews and Other Contexts --------------------------- From be39e92508348fa2c8ecbad0b3259be17c4e9072 Mon Sep 17 00:00:00 2001 From: vrunoa Date: Thu, 15 Jun 2017 21:56:32 -0300 Subject: [PATCH 06/14] add method for getting battery level --- spec-draft.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec-draft.md b/spec-draft.md index a34678c..dc4a083 100644 --- a/spec-draft.md +++ b/spec-draft.md @@ -295,6 +295,9 @@ A `BatteryState` can be one of two strings: 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. +* GET /session/:sessionId/appium/device/battery_level + * returns [0..100] + * POST /session/:sessionId/appium/device/battery_level * accepts [0..100] From be4ad07efe48fa66b057df5003acab277ab316da Mon Sep 17 00:00:00 2001 From: vrunoa Date: Thu, 15 Jun 2017 22:05:20 -0300 Subject: [PATCH 07/14] update markdown --- spec-draft.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/spec-draft.md b/spec-draft.md index dc4a083..0f12a60 100644 --- a/spec-draft.md +++ b/spec-draft.md @@ -306,8 +306,7 @@ 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) ----------------- +### 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 @@ -324,8 +323,7 @@ The idea is to be able to mock phone calls entering the device and handle the ac 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 ---- +### 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 @@ -333,7 +331,6 @@ During this days a lot of apps depend on receiving sms, even if they are not mes - WebViews and Other Contexts --------------------------- One common feature of mobile platforms is the ability to embed a chromeless From f5cc541368623111a4169339e10e8d704661b20f Mon Sep 17 00:00:00 2001 From: vrunoa Date: Fri, 16 Jun 2017 20:59:23 -0300 Subject: [PATCH 08/14] remove appium from endpoints --- spec-draft.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec-draft.md b/spec-draft.md index 0f12a60..975b47c 100644 --- a/spec-draft.md +++ b/spec-draft.md @@ -281,11 +281,11 @@ Device battery changes might trigger events on users applications, controlling t 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 +* GET /session/:sessionId/device/battery_state * returns BatteryState -* POST /session/:sessionId/appium/device/battery_state +* POST /session/:sessionId/device/battery_state * accepts BatteryState @@ -295,10 +295,10 @@ A `BatteryState` can be one of two strings: 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. -* GET /session/:sessionId/appium/device/battery_level +* GET /session/:sessionId/device/battery_level * returns [0..100] -* POST /session/:sessionId/appium/device/battery_level +* POST /session/:sessionId/device/battery_level * accepts [0..100] @@ -309,7 +309,7 @@ Receiving messages or phone calls it's usual on mobile devices, having the possi ### 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 +* POST /session/:sessionId/device/gsm_call * accepts PhoneNumber, GsmAction @@ -326,7 +326,7 @@ The `CALL` action should trigger the mocked call to the device from the `PhoneNu ### 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 +* POST /session/:sessionId/device/sms_send * accepts PhoneNumber, Message From 525eb16781d7d7d37783a70fc5ec1e67f6ba6928 Mon Sep 17 00:00:00 2001 From: vrunoa Date: Fri, 16 Jun 2017 21:03:56 -0300 Subject: [PATCH 09/14] define battery level as an Integer --- spec-draft.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec-draft.md b/spec-draft.md index 975b47c..41215f3 100644 --- a/spec-draft.md +++ b/spec-draft.md @@ -293,13 +293,13 @@ 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. +In some cases, apps might respond different on low battery level so the idea is to provide a method to set specific battery percent level for the devices. * GET /session/:sessionId/device/battery_level - * returns [0..100] + * returns Integer between [0..100] * POST /session/:sessionId/device/battery_level - * accepts [0..100] + * accepts Integer between [0..100] External communication factors From 650a9b09eed7e95800dac4af27abe1fc29ddf82d Mon Sep 17 00:00:00 2001 From: vrunoa Date: Fri, 16 Jun 2017 21:16:09 -0300 Subject: [PATCH 10/14] update phone call specs to accept json object --- spec-draft.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spec-draft.md b/spec-draft.md index 41215f3..bdb2e86 100644 --- a/spec-draft.md +++ b/spec-draft.md @@ -310,10 +310,11 @@ Receiving messages or phone calls it's usual on mobile devices, having the possi 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/device/gsm_call - * accepts PhoneNumber, GsmAction + * accepts { phoneNumber: PhoneNumber, action: GsmAction } -`GsmAction`'s would be: +Where `PhoneNumber` should be a valid phone number and +`GsmAction`'s would be String constants: * CALL * ACCEPT @@ -327,7 +328,7 @@ The `CALL` action should trigger the mocked call to the device from the `PhoneNu 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/device/sms_send - * accepts PhoneNumber, Message + * accepts { phoneNumber: PhoneNumber, message: Message } From ef3ae0c64a5f71ad87fbea4842bcbabb4377efd3 Mon Sep 17 00:00:00 2001 From: vrunoa Date: Fri, 16 Jun 2017 21:16:42 -0300 Subject: [PATCH 11/14] remove _send from sms endpoint --- spec-draft.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec-draft.md b/spec-draft.md index bdb2e86..4807cba 100644 --- a/spec-draft.md +++ b/spec-draft.md @@ -327,7 +327,7 @@ The `CALL` action should trigger the mocked call to the device from the `PhoneNu ### 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/device/sms_send +* POST /session/:sessionId/device/sms * accepts { phoneNumber: PhoneNumber, message: Message } From 90fa7972484327f973a288062b2cffe996e6b8ab Mon Sep 17 00:00:00 2001 From: vrunoa Date: Fri, 16 Jun 2017 21:26:27 -0300 Subject: [PATCH 12/14] set Message definition --- spec-draft.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec-draft.md b/spec-draft.md index 4807cba..29be450 100644 --- a/spec-draft.md +++ b/spec-draft.md @@ -325,11 +325,12 @@ The `CALL` action should trigger the mocked call to the device from the `PhoneNu ### 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 +During this days a lot of apps depend on receiving sms, even if they are not a messaging platform, apps may want to check sms to validate accounts, receive promotion codes, etc. We could add * POST /session/:sessionId/device/sms * accepts { phoneNumber: PhoneNumber, message: Message } +been `Message` a valid String text. WebViews and Other Contexts From f0f4ac5f3b497f971084c495c163057166d8515e Mon Sep 17 00:00:00 2001 From: vrunoa Date: Mon, 19 Jun 2017 11:04:34 -0300 Subject: [PATCH 13/14] add gsm state --- spec-draft.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/spec-draft.md b/spec-draft.md index 29be450..96cf588 100644 --- a/spec-draft.md +++ b/spec-draft.md @@ -323,6 +323,17 @@ Where `PhoneNumber` should be a valid phone number and 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. +At a certain moment *GSM* service can be altered due to travels, network going down and other factors, so we could add: + +* POST /session/:sessionId/device/gsm_state + * accepts GsmState + +to alter this states using Strings constant to set the `GsmState`: +* HOME +* UNREGISTERED +* SEARCHING +* ROAMING + ### SMS During this days a lot of apps depend on receiving sms, even if they are not a messaging platform, apps may want to check sms to validate accounts, receive promotion codes, etc. We could add @@ -330,7 +341,7 @@ During this days a lot of apps depend on receiving sms, even if they are not a m * POST /session/:sessionId/device/sms * accepts { phoneNumber: PhoneNumber, message: Message } -been `Message` a valid String text. +been `Message` a valid String text. WebViews and Other Contexts From b91d765d7cf7a17ad8787e7ce49b5693448f782c Mon Sep 17 00:00:00 2001 From: vrunoa Date: Mon, 19 Jun 2017 11:09:10 -0300 Subject: [PATCH 14/14] add gsm state --- spec-draft.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec-draft.md b/spec-draft.md index 96cf588..3edfdf6 100644 --- a/spec-draft.md +++ b/spec-draft.md @@ -328,7 +328,7 @@ At a certain moment *GSM* service can be altered due to travels, network going d * POST /session/:sessionId/device/gsm_state * accepts GsmState -to alter this states using Strings constant to set the `GsmState`: +to change it using Strings constant to set the `GsmState`: * HOME * UNREGISTERED * SEARCHING