Exemple #1
0
        public void PerformTouchAction(ITouchAction touchAction)
        {
            if (touchAction == null)
            {
                return;
            }
            var parameters = AppiumCommandExecutionHelper.PrepareArgument("actions", touchAction.GetParameters());

            Execute(AppiumDriverCommand.PerformTouchAction, parameters);
        }
Exemple #2
0
        public string StopRecordingScreen(IScreenRecordingOptions options)
        {
            var parameters = AppiumCommandExecutionHelper.PrepareArgument("options", options.GetParameters());

            return(Execute(AppiumDriverCommand.StopRecordingScreen, parameters).Value.ToString());
        }
Exemple #3
0
 public AppState GetAppState(string appId) =>
 (AppState)Convert.ToInt32(Execute(AppiumDriverCommand.GetAppState,
                                   AppiumCommandExecutionHelper.PrepareArgument("appId", appId)).Value.ToString());
Exemple #4
0
 /// <summary>
 /// Activate the given IME on Device
 /// </summary>
 /// <param name="imeEngine">IME to activate</param>
 public void ActivateIMEEngine(string imeEngine) =>
 Execute(AppiumDriverCommand.ActivateEngine,
         AppiumCommandExecutionHelper.PrepareArgument("engine", imeEngine));
Exemple #5
0
 public void BackgroundApp(int seconds) =>
 Execute(AppiumDriverCommand.BackgroundApp,
         AppiumCommandExecutionHelper.PrepareArgument("seconds", seconds));
Exemple #6
0
 public void BackgroundApp(TimeSpan timeSpan) =>
 Execute(AppiumDriverCommand.BackgroundApp,
         AppiumCommandExecutionHelper.PrepareArgument("seconds", timeSpan.TotalSeconds));
Exemple #7
0
 public byte[] PullFile(string pathOnDevice) =>
 Convert.FromBase64String(Execute(AppiumDriverCommand.PullFile,
                                  AppiumCommandExecutionHelper.PrepareArgument("path", pathOnDevice)).Value.ToString());
Exemple #8
0
 public byte[] PullFolder(string remotePath) =>
 Convert.FromBase64String(Execute(AppiumDriverCommand.PullFolder,
                                  AppiumCommandExecutionHelper.PrepareArgument("path", remotePath)).Value.ToString());
Exemple #9
0
 public bool IsAppInstalled(string bundleId) =>
 Convert.ToBoolean(Execute(AppiumDriverCommand.IsAppInstalled,
                           AppiumCommandExecutionHelper.PrepareArgument("bundleId", bundleId)).Value.ToString());
Exemple #10
0
 public bool TerminateApp(string appId) =>
 Convert.ToBoolean(Execute(AppiumDriverCommand.TerminateApp,
                           AppiumCommandExecutionHelper.PrepareArgument("appId", appId)).Value.ToString());
Exemple #11
0
 public void ActivateApp(string appId) =>
 Execute(AppiumDriverCommand.ActivateApp, AppiumCommandExecutionHelper.PrepareArgument("appId", appId));
Exemple #12
0
 public void InstallApp(string appPath) =>
 Execute(AppiumDriverCommand.InstallApp, AppiumCommandExecutionHelper.PrepareArgument("appPath", appPath));
 public void BackgroundApp() =>
 Execute(AppiumDriverCommand.BackgroundApp,
         AppiumCommandExecutionHelper.PrepareArgument("seconds", AppiumCommandExecutionHelper.PrepareArgument("timeout", null)));