Repository navigation
#835 added handlers for toggle_wifi,data and airplane mode - #837
Conversation
| commandRepository.put(POWER_AC_STATE, postC("/session/:sessionId/appium/device/power_ac")); | ||
| commandRepository.put(TOGGLE_WIFI, postC("/session/:sessionId/appium/device/toggle_wifi")); | ||
| commandRepository.put(TOGGLE_WIFI, postC("/session/:sessionId/appium/device/toggle_airplane_mode")); | ||
| commandRepository.put(TOGGLE_WIFI, postC("/session/:sessionId/appium/device/toggle_data")); |
| CommandExecutionHelper.execute(this, toggleLocationServicesCommand()); | ||
| } | ||
|
|
||
| public void toggleWifi() { |
There was a problem hiding this comment.
This might be useful to have these methods in the separate SupportsNetworkStateManagement interface
There was a problem hiding this comment.
Okay i will do that :) cheers
| CommandExecutionHelper.execute(this, toggleWifiCommand()); | ||
| } | ||
|
|
||
| public void toggleAirplaneMode() { |
There was a problem hiding this comment.
docstrings are missing. BTW, this method works for Android only. Also, it foes not work since Android 7+
There was a problem hiding this comment.
In such case, what to do ?
There was a problem hiding this comment.
apply the interface to Android driver only. Also, describe the limitations in the docstring
There was a problem hiding this comment.
should we move it inside SupportsSpecialEmulatorCommands
not needed. As you said Appium will anyway throw an exception if the command didn't work. Although, it might be useful to describe what is supported in the docstring
| CommandExecutionHelper.execute(this, toggleAirplaneCommand()); | ||
| } | ||
|
|
||
| public void toggleData() { |
There was a problem hiding this comment.
This only works on Android. Also, the device should be rooted
There was a problem hiding this comment.
Shouldn't the server thrown exception in this case ?
|
|
||
| /** | ||
| * Toggle Airplane mode and this works on OS 6.0 | ||
| * and does not work on OS 7.0 and greater |
Types of changes
What types of changes are you proposing/introducing to Java client?
Put an
xin the boxes that apply