/// <summary> /// Initialize the Appium Engine with given settings /// Will download the node js and npm, appium package and reset appium config /// </summary> /// <param name="settings">Settings file to load</param> public void Init(IAppiumAppSettings settings) { _Settings = settings; _Settings.Load(); this._LoadActionsThread = new Thread(() => { if (!File.Exists(this._NodePath) || !File.Exists(this._NPMPath)) { _DownloadAndInstallNodeJS(); } if (!Directory.Exists(this._AppiumPackageFolder)) { if (!Directory.Exists(this._NodeModulesFolder)) { Directory.CreateDirectory(this._NodeModulesFolder); } _NPMInstallAppium(); } if (!File.Exists(Path.Combine(this._AppiumPackageFolder, ".appiumconfig"))) { _ResetAppium(); } IsInitialized = true; }); this._LoadActionsThread.Name = "Load Actions"; this._LoadActionsThread.Priority = ThreadPriority.AboveNormal; this._LoadActionsThread.Start(); }
/// <summary>constructor</summary> /// <param name="form">main form</param> public Model(MainForm form, IAppiumAppSettings settings) { this._View = form; _Settings = settings; // load settings _Settings.Load(); }
/// <summary> /// Constructor /// </summary> public AndroidSettingsVM(IAppiumAppSettings settings, List<string> avds) { _Settings = settings; LaunchAVDs = avds; if (null != LaunchAVDs && 0 < LaunchAVDs.Count) { SelectedLaunchAVD = LaunchAVDs[0]; } }
/// <summary> /// Constructor /// </summary> public AndroidSettingsVM(IAppiumAppSettings settings, List<string> avds) { _Settings = settings; LaunchAVDs = avds; if (null != LaunchAVDs && 0 < LaunchAVDs.Count) { SelectedLaunchAVD = LaunchAVDs[0]; } PlatformNameList = Dictionaries.PlatformNameList; if (string.IsNullOrWhiteSpace(PlatformName)) { PlatformName = PlatformNameList[0]; } AutomationNameList = Dictionaries.AutomationNameList; if (string.IsNullOrWhiteSpace(AutomationName)) { AutomationName = AutomationNameList[0]; } PlatformVersionList = Dictionaries.PlatformVersionList; if (string.IsNullOrWhiteSpace(PlatformVersion)) { PlatformVersion = PlatformVersionList[0]; } LanguageList = Dictionaries.LanguageList; if (string.IsNullOrWhiteSpace(Language)) { Language = LanguageList[0]; } LocaleList = Dictionaries.LocaleList; if (string.IsNullOrWhiteSpace(Locale)) { Locale = LocaleList[0]; } AndroidBrowserList = Dictionaries.AndroidBrowserList; if (string.IsNullOrWhiteSpace(AndroidBrowser)) { AndroidBrowser = AndroidBrowserList[0]; } }
/// <summary> /// Constructor /// </summary> public AndroidSettingsVM(IAppiumAppSettings settings, List <string> avds) { _Settings = settings; LaunchAVDs = avds; if (null != LaunchAVDs && 0 < LaunchAVDs.Count) { SelectedLaunchAVD = LaunchAVDs[0]; } PlatformNameList = Dictionaries.PlatformNameList; if (string.IsNullOrWhiteSpace(PlatformName)) { PlatformName = PlatformNameList[0]; } AutomationNameList = Dictionaries.AutomationNameList; if (string.IsNullOrWhiteSpace(AutomationName)) { AutomationName = AutomationNameList[0]; } PlatformVersionList = Dictionaries.PlatformVersionList; if (string.IsNullOrWhiteSpace(PlatformVersion)) { PlatformVersion = PlatformVersionList[0]; } LanguageList = Dictionaries.LanguageList; if (string.IsNullOrWhiteSpace(Language)) { Language = LanguageList[0]; } LocaleList = Dictionaries.LocaleList; if (string.IsNullOrWhiteSpace(Locale)) { Locale = LocaleList[0]; } AndroidBrowserList = Dictionaries.AndroidBrowserList; if (string.IsNullOrWhiteSpace(AndroidBrowser)) { AndroidBrowser = AndroidBrowserList[0]; } }
/// <summary> /// Constructor /// </summary> public MainWindowVM() { AutomapperConfiguration.Configure(); // create the settings for the application _Settings = new DefaultAppiumAppSettings(); // get the appium engine and wire up to it _AppiumEngine = AppiumEngine.Instance; _AppiumEngine.RunningStatusChanged += _AppiumEngine_RunningStatusChanged; _AppiumEngine.OutputDataReceived += _OutputDataReceived; _AppiumEngine.ErrorDataReceived += _OutputDataReceived; _AppiumEngine.Init(_Settings); if (_Settings.CheckForUpdates) { // wait ten seconds to the page loads Thread.Sleep(10000); _AppiumEngine.CheckForUpdate(); } }
/// <summary> /// Constructor /// </summary> public MainWindowVM() { AutomapperConfiguration.Configure(); // create the settings for the application _Settings = new DefaultAppiumAppSettings(); // get the appium engine and wire up to it _AppiumEngine = AppiumEngine.Instance; _AppiumEngine.RunningStatusChanged += _AppiumEngine_RunningStatusChanged; _AppiumEngine.OutputDataReceived += _OutputDataReceived; _AppiumEngine.ErrorDataReceived += _OutputDataReceived; _AppiumEngine.Init(_Settings); if (_Settings.CheckForUpdates) { _AppiumEngine.CheckForUpdate(); } _RemoteServerString = GetPropertyName(() => GeneralSettingsVM.UseRemoteServer); _UpdateRemoteServerSettings(); GeneralSettingsVM.PropertyChanged += _GeneralSettingsVM_PropertyChanged; }
/// <summary> /// Initialize the Appium Engine with given settings /// Will download the node js and npm, appium package and reset appium config /// </summary> /// <param name="settings">Settings file to load</param> public void Init(IAppiumAppSettings settings) { _Settings = settings; _Settings.Load(); this._LoadActionsThread = new Thread(() => { if (!File.Exists(this._NodePath) || !File.Exists(this._NPMPath)) { DownloadAndInstallNodeJS(); } if (!Directory.Exists(this._AppiumPackageFolder)) { if (!Directory.Exists(this._NodeModulesFolder)) { Directory.CreateDirectory(this._NodeModulesFolder); } NPMInstallAppium(); } if (!File.Exists(Path.Combine(this._AppiumPackageFolder, ".appiumconfig"))) { _ResetAppium(); } IsInitialized = true; }); this._LoadActionsThread.Name = "Load Actions"; this._LoadActionsThread.Priority = ThreadPriority.AboveNormal; this._LoadActionsThread.Start(); }
/// <summary> /// Constructor /// </summary> public GeneralSettingsVM(IAppiumAppSettings settings) { _Settings = settings; }
/// <summary> /// Constructor /// </summary> /// <param name="settings">Current Settings</param> public InspectorWindowVM(IAppiumAppSettings settings) { _Settings = settings; Message = "Click \"Refresh\" button to start inspecting"; }
/// <summary> /// Constructor /// </summary> /// <param name="settings"></param> public SeleniumDriver(IAppiumAppSettings settings) { _Settings = settings; }
public PreferencesPModel(IAppiumAppSettings settings, IPreferencesView view) { _Settings = settings; _View = view; }
/// <summary> /// Constructor /// </summary> public DeveloperSettingsVM(IAppiumAppSettings settings) { _Settings = settings; }