コード例 #1
0
        /// <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();
        }
コード例 #2
0
ファイル: Model.cs プロジェクト: Thwaitesy/appium-dot-exe
 /// <summary>constructor</summary>
 /// <param name="form">main form</param>
 public Model(MainForm form, IAppiumAppSettings settings)
 {
     this._View = form;
     _Settings = settings;
     // load settings
     _Settings.Load();
 }
コード例 #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 public AndroidSettingsVM(IAppiumAppSettings settings, List<string> avds)
 {
     _Settings = settings;
     LaunchAVDs = avds;
     if (null != LaunchAVDs && 0 < LaunchAVDs.Count)
     {
         SelectedLaunchAVD = LaunchAVDs[0];
     }
 }
コード例 #4
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];
            }

        }
コード例 #5
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];
            }
        }
コード例 #6
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();
            }
        }
コード例 #7
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)
            {
                _AppiumEngine.CheckForUpdate();
            }

            _RemoteServerString = GetPropertyName(() => GeneralSettingsVM.UseRemoteServer);
            _UpdateRemoteServerSettings();
            GeneralSettingsVM.PropertyChanged += _GeneralSettingsVM_PropertyChanged;
        }
コード例 #8
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)
            {
                _AppiumEngine.CheckForUpdate();
            }

            _RemoteServerString = GetPropertyName(() => GeneralSettingsVM.UseRemoteServer);
            _UpdateRemoteServerSettings();
            GeneralSettingsVM.PropertyChanged += _GeneralSettingsVM_PropertyChanged;
        }
コード例 #9
0
        /// <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();
        }
コード例 #10
0
 /// <summary>
 /// Constructor
 /// </summary>
 public GeneralSettingsVM(IAppiumAppSettings settings)
 {
     _Settings = settings;
 }
コード例 #11
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="settings">Current Settings</param>
 public InspectorWindowVM(IAppiumAppSettings settings)
 {
     _Settings = settings;
     Message   = "Click \"Refresh\" button to start inspecting";
 }
コード例 #12
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="settings"></param>
 public SeleniumDriver(IAppiumAppSettings settings)
 {
     _Settings = settings;
 }
コード例 #13
0
 public PreferencesPModel(IAppiumAppSettings settings, IPreferencesView view)
 {
     _Settings = settings;
     _View = view;
 }
コード例 #14
0
 /// <summary>
 /// Constructor
 /// </summary>
 public GeneralSettingsVM(IAppiumAppSettings settings)
 {
     _Settings = settings;
 }
コード例 #15
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="settings">Current Settings</param>
 public InspectorWindowVM(IAppiumAppSettings settings)
 {
     _Settings = settings;
     Message = "Click \"Refresh\" button to start inspecting";
 }
コード例 #16
0
 /// <summary>
 /// Constructor
 /// </summary>
 public DeveloperSettingsVM(IAppiumAppSettings settings)
 {
     _Settings = settings;
 }
コード例 #17
0
 /// <summary>
 /// Constructor
 /// </summary>
 public DeveloperSettingsVM(IAppiumAppSettings settings)
 {
     _Settings = settings;
 }