Ejemplo n.º 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();
        }
Ejemplo n.º 2
0
 /// <summary>constructor</summary>
 /// <param name="form">main form</param>
 public Model(MainForm form, IAppiumAppSettings settings)
 {
     this._View = form;
     _Settings = settings;
     // load settings
     _Settings.Load();
 }
Ejemplo n.º 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];
     }
 }
        /// <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];
            }

        }
Ejemplo n.º 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];
            }
        }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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;
        }
        /// <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;
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 10
0
 /// <summary>
 /// Constructor
 /// </summary>
 public GeneralSettingsVM(IAppiumAppSettings settings)
 {
     _Settings = settings;
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="settings">Current Settings</param>
 public InspectorWindowVM(IAppiumAppSettings settings)
 {
     _Settings = settings;
     Message   = "Click \"Refresh\" button to start inspecting";
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="settings"></param>
 public SeleniumDriver(IAppiumAppSettings settings)
 {
     _Settings = settings;
 }
Ejemplo n.º 13
0
 public PreferencesPModel(IAppiumAppSettings settings, IPreferencesView view)
 {
     _Settings = settings;
     _View = view;
 }
Ejemplo n.º 14
0
 /// <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";
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Constructor
 /// </summary>
 public DeveloperSettingsVM(IAppiumAppSettings settings)
 {
     _Settings = settings;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public DeveloperSettingsVM(IAppiumAppSettings settings)
 {
     _Settings = settings;
 }