public static void PushFile(IExecuteMethod executeMethod, string pathOnDevice, byte[] base64Data) => executeMethod.Execute(AppiumDriverCommand.PushFile, new Dictionary <string, object>() { ["path"] = pathOnDevice, ["data"] = base64Data });
public static void Lock(IExecuteMethod executeMethod, int seconds) => executeMethod.Execute(AppiumDriverCommand.LockDevice, new Dictionary <string, object>() { ["seconds"] = seconds });
public static void SetGsmStrength(IExecuteMethod executeMethod, GsmSignalStrength gsmSignalStrength) => executeMethod.Execute(AppiumDriverCommand.SetGsmSignalStrength, PrepareArgument("signalStrength", gsmSignalStrength));
public static void SetClipboardImage(IExecuteMethod executeMethod, string base64EncodeImage) { AppiumCommandExecutionHelper.SetClipboard(executeMethod, ClipboardContentType.Image, base64EncodeImage); }
public static void ToggleData(IExecuteMethod executeMethod) => executeMethod.Execute(AppiumDriverCommand.ToggleData);
public static void GsmCall(IExecuteMethod executeMethod, string number, GsmCallActions gsmCallAction) => executeMethod.Execute(AppiumDriverCommand.GsmCall, PrepareArguments(new[] { "phoneNumber", "action" }, new object[] { number, gsmCallAction.ToString().ToLowerInvariant() }));
public static void Unlock(IExecuteMethod executeMethod) => executeMethod.Execute(AppiumDriverCommand.UnlockDevice);
public static void ToggleLocationServices(IExecuteMethod executeMethod) => executeMethod.Execute(AppiumDriverCommand.ToggleLocationServices);
public static void OpenNotifications(IExecuteMethod executeMethod) => executeMethod.Execute(AppiumDriverCommand.OpenNotifications);
public static bool IsLocked(IExecuteMethod executeMethod) => (bool)executeMethod.Execute(AppiumDriverCommand.IsLocked).Value;
public static string EndTestCoverage(IExecuteMethod executeMethod, string intent, string path) => executeMethod.Execute(AppiumDriverCommand.EndTestCoverage, new Dictionary <string, object>() { ["intent"] = intent, ["path"] = path }).Value as string;
public static bool IsKeyboardShown(IExecuteMethod executeMethod) { var response = executeMethod.Execute(AppiumDriverCommand.IsKeyboardShown); return((bool)response.Value); }
public static void FingerPrint(IExecuteMethod executeMethod, int fingerprintId) => executeMethod.Execute(AppiumDriverCommand.FingerPrint, new Dictionary <string, object>() { ["fingerprintId"] = fingerprintId });
public static void ShakeDevice(IExecuteMethod executeMethod) => executeMethod.Execute(AppiumDriverCommand.ShakeDevice);
public static void ReplaceValue(IExecuteMethod executeMethod, string elementId, string value) => executeMethod.Execute(AppiumDriverCommand.ReplaceValue, new Dictionary <string, object>() { ["id"] = elementId, ["value"] = new string[] { value } });
public static void PerformTouchID(IExecuteMethod executeMethod, bool match) => executeMethod.Execute(AppiumDriverCommand.TouchID, new Dictionary <string, object>() { ["match"] = match });
public static Dictionary <string, object> GetSettings(IExecuteMethod executeMethod) => (Dictionary <string, object>)executeMethod.Execute(AppiumDriverCommand.GetSettings).Value;
public static void ToggleAirplaneMode(IExecuteMethod executeMethod) => executeMethod.Execute(AppiumDriverCommand.ToggleAirplaneMode);
public static string GetCurrentActivity(IExecuteMethod executeMethod) => executeMethod.Execute(AppiumDriverCommand.GetCurrentActivity).Value as string;
public static void ToggleWifi(IExecuteMethod executeMethod) => executeMethod.Execute(AppiumDriverCommand.ToggleWiFi);
public static string GetCurrentPackage(IExecuteMethod executeMethod) => executeMethod.Execute(AppiumDriverCommand.GetCurrentPackage).Value as string;
public static void SendSms(IExecuteMethod executeMethod, string number, string message) => executeMethod.Execute(AppiumDriverCommand.SendSms, PrepareArguments(new[] { "phoneNumber", "message" }, new object[] { number, message }));
public static string GetClipboardText(IExecuteMethod executeMethod) { var encodedContentBytes = Convert.FromBase64String(GetClipboard(executeMethod, ClipboardContentType.PlainText)); return(Encoding.UTF8.GetString(encodedContentBytes)); }
public static void SetGsmVoice(IExecuteMethod executeMethod, GsmVoiceState gsmVoiceState) => executeMethod.Execute(AppiumDriverCommand.SetGsmVoiceState, PrepareArgument("state", gsmVoiceState.ToString() .ToLowerInvariant()));
public static void LongPressKeyCode(IExecuteMethod executeMethod, KeyEvent keyEvent) => executeMethod.Execute(AppiumDriverCommand.LongPressKeyCode, keyEvent.Build());