public void Start(string initialisationString = null, AutomationIdentification automationIdentification = AutomationIdentification.TryEverything) { if (_hostController != null) throw new InvalidOperationException("hostController already initialised"); if (DeviceController != null) throw new InvalidOperationException("Driver already initialised"); var bindingAddressUri = string.IsNullOrEmpty(initialisationString) ? null : new Uri(initialisationString); StartDriver(); StartPhoneAutomationController(automationIdentification, bindingAddressUri); }
public void Start(string initialisationString = null, AutomationIdentification automationIdentification = AutomationIdentification.TryEverything) { if (_hostController != null) throw new InvalidOperationException("hostController already initialised"); if (DeviceController != null) throw new InvalidOperationException("Driver already initialised"); var parsedInitialisationString = new ParsedInitialisationString(initialisationString); var bindingAddressUrl = parsedInitialisationString.SafeGetValue("BindingAddress"); var bindingAddressUri = new Uri(string.IsNullOrEmpty(bindingAddressUrl) ? DefaultBindingAddress : bindingAddressUrl); StartDriver(parsedInitialisationString); StartPhoneAutomationController(automationIdentification, bindingAddressUri); }
public void Fill(string text, AutomationIdentification automationIdentification) { AutomationName = automationIdentification.HasFlag(AutomationIdentification.TryAutomationName) ? text : null; ElementName = automationIdentification.HasFlag(AutomationIdentification.TryElementName) ? text : null; DisplayedText = automationIdentification.HasFlag(AutomationIdentification.TryDisplayedText) ? text : null; }
protected void StartPhoneAutomationController(AutomationIdentification automationIdentification, Uri bindingAddress) { try { var hostController = new ServiceHostController() { AutomationIdentification = automationIdentification, }; hostController.Trace += (sender, args) => InvokeTrace(args); hostController.Start(bindingAddress); _hostController = hostController; } catch (Exception exception) { throw new AutomationException("Failed to start ApplicationAutomationController", exception); } }
public AutomationIdentifier(string text, AutomationIdentification automationIdentification) { Fill(text, automationIdentification); }
public void Start(WindowsPhoneVersion version, string initialisationString = null, AutomationIdentification automationIdentification = AutomationIdentification.TryEverything) { throw new NotImplementedException(); }
public ApplicationAutomationController( IPhoneAutomationServiceControl serviceControl, AutomationIdentification automationIdentification) { this.serviceControl = serviceControl; this.automationIdentification = automationIdentification; }