public void LocateElement_NoTargetSpecifiedInParameters_ThrowsAutomationException_ErrorAutomation007() { try { CommandParameters parameters = new CommandParameters(new Dictionary <string, string>(), string.Empty); TargetElementLocator.LocateElement(parameters); } catch (A11yAutomationException ex) { Assert.IsTrue(ex.Message.Contains("Automation007:")); throw; } }
public void LocateElement_SpecifiedPIDNotExist_ThrowsAutomationException_ErrorAutomation017() { try { var ps = new Dictionary <string, string>(); ps.Add(CommandConstStrings.TargetProcessId, "-1"); // invalid process id. CommandParameters parameters = new CommandParameters(ps, string.Empty); TargetElementLocator.LocateElement(parameters); } catch (A11yAutomationException ex) { Assert.IsTrue(ex.Message.Contains("Automation017:")); throw; } }