Add handlers for gsm, network, power and sms command#834
Add handlers for gsm, network, power and sms command#834SrinivasanTarget merged 5 commits intoappium:masterappium/java-client:masterfrom SrinivasanTarget:gsmCopy head branch name to clipboard
Conversation
|
|
||
| private final String gsmcall; | ||
|
|
||
| GsmCallActions(String gsmcall) { |
There was a problem hiding this comment.
this constructor is redundant. All enum elements have name() and ordinal() properties. That's pretty all you need. Same comment to other enums
| CommandExecutionHelper.execute(this, toggleLocationServicesCommand()); | ||
| } | ||
|
|
||
| /** |
There was a problem hiding this comment.
I'd rather put these methods into separate interface named as SupportsSpecialEmulatorCommands
| * | ||
| * @return a key-value pair. The key is the command name. The value is a {@link Map} command arguments. | ||
| */ | ||
| public static Map.Entry<String, Map<String, ?>> powerACCommand( |
There was a problem hiding this comment.
all these methods have one extra space between the return type and the method name
| /** | ||
| * Emulate power state change on the connected emulator. | ||
| * | ||
| * @param powerACState One of available Power AC state. |
There was a problem hiding this comment.
I'd rather put a direct link to the corresponding enum here
Yeah but i'm not sure what to assert here? Do you have any better suggestion? @mykola-mokhnach |
try maybe this workaround |
| try { | ||
| driver.sendSMS("11111111", "call"); | ||
| } catch (Exception e) { | ||
| assertFalse( "method works only in emulators", true); |
There was a problem hiding this comment.
You can use fail call instead
| * @param phoneNumber The phone number of the caller. | ||
| * @param gsmCallActions One of available {@link GsmCallActions} values. | ||
| */ | ||
| default void setGsmCall(String phoneNumber, GsmCallActions gsmCallActions) { |
There was a problem hiding this comment.
makeGsmCall would be a better name
| * @param gsmSignalStrength One of available {@link GsmSignalStrength} values. | ||
| */ | ||
| default void setGsmSignalStrength(GsmSignalStrength gsmSignalStrength) { | ||
| CommandExecutionHelper.execute( this, gsmSignalStrengthCommand(gsmSignalStrength)); |
There was a problem hiding this comment.
extra space before this
Change list
Add handlers for gsm, network, power and sms command
https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L366-L375
Types of changes
What types of changes are you proposing/introducing to Java client?
Put an
xin the boxes that apply@mykola-mokhnach ping