Start() public method

public Start ( ) : void
return void
Ejemplo n.º 1
0
        public void Initialise(string remoteUrl = "")
        {
            if (_initialised)
            {
                return;
            }

            if (Application.Current.RootVisual == null)
            {
                throw new TestAutomationException("Automation client initialised too early");
            }

            remoteUrl = string.IsNullOrEmpty(remoteUrl) ? BddHostForWindowsPhone8 : remoteUrl;

            var configuration = new Configuration()
            {
                RemoteUrl =
                    string.IsNullOrEmpty(remoteUrl) ? Configuration.DefaultRemoteUrl : remoteUrl,
                UiDispatcher = Application.Current.RootVisual.Dispatcher
            };

            var automationClient = new AutomationClient(configuration);

            automationClient.Start();
            Application.Current.Exit += (sender, args) => automationClient.Stop();

            _initialised = true;
        }
Ejemplo n.º 2
0
        public void Initialise(string remoteUrl = "")
        {
            if (_initialised)
                return;

            if (Application.Current.RootVisual == null)
                throw new TestAutomationException("Automation client initialised too early");

            var configuration = new Configuration()
                                    {
                                        RemoteUrl =
                                            string.IsNullOrEmpty(remoteUrl) ? Configuration.DefaultRemoteUrl : remoteUrl,
                                        UiDispatcher = Application.Current.RootVisual.Dispatcher
                                    };

            var automationClient = new AutomationClient(configuration);
            automationClient.Start();
            Application.Current.Exit += (sender, args) => automationClient.Stop();

            _initialised = true;
        }