public void AndClass() { // Act By configuration = new By().AndClass("SomeClass"); // Assert Assert.AreEqual(1, configuration.Configuration.Count); }
public void AndId() { // Act By configuration = new By().AndId("SomeId"); // Assert Assert.AreEqual(1, configuration.Configuration.Count); }
/// <summary> /// Adds a mechanism to find controls by specified automation id. /// </summary> /// <param name="automationId">The automation id.</param> /// <param name="conditionOperator"> /// The operator to use to compare the values (either the values are equal or the property /// value contains the provided property value). /// </param> /// <returns> /// The mechanisms by how particular instances of <see cref="UITestControl"/> are found in /// the UI. /// </returns> public static By AutomationId( string automationId, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { var by = new By(); by.configurators.Add(new AutomationIdConfigurator(automationId, conditionOperator)); return by; }
public void AndValueAttribute() { // Act By configuration = new By().AndValueAttribute("SomeValueAttribute"); // Assert Assert.AreEqual(1, configuration.Configuration.Count); }
public void AndSearchProperties() { // Act By configuration = new By().AndSearchProperties("SomeName=SomeValue"); // Assert Assert.AreEqual(1, configuration.Configuration.Count); }
public void AndTagName() { // Act By configuration = new By().AndTagName("SomeTagName"); // Assert Assert.AreEqual(1, configuration.Configuration.Count); }
public void AndControlName() { // Act By configuration = new By().AndControlName("SomeControlName"); // Assert Assert.AreEqual(1, configuration.Configuration.Count); Assert.AreEqual(PropertyExpressionOperator.EqualTo, configuration.Configuration.First().PropertyOperator); }
public void AndClassNameContains() { // Act By configuration = new By().AndClassNameContains("SomeClassName"); // Assert Assert.AreEqual(1, configuration.Configuration.Count); Assert.AreEqual(PropertyExpressionOperator.Contains, configuration.Configuration.First().PropertyOperator); }
// TODO: The factory should be able to create instances with default constructor // ReSharper disable once UnusedParameter.Local // the constructor requires a parameter in order for it to be dynamically created by CUITe public Div2(By searchConfiguration) : base(By.Id("div2")) { }
/// <summary> /// Initializes a new instance of the <see cref="HtmlOrderedList"/> class. /// </summary> /// <param name="searchConfiguration">The search configuration.</param> public HtmlOrderedList(By searchConfiguration = null) : this(new CUITControls.HtmlCustom(), searchConfiguration) { }
/// <summary> /// Initializes a new instance of the <see cref="HtmlPassword"/> class. /// </summary> /// <param name="sourceControl">The source control.</param> /// <param name="searchConfiguration">The search configuration.</param> public HtmlPassword(CUITControls.HtmlEdit sourceControl, By searchConfiguration = null) : base(sourceControl, searchConfiguration) { AddSearchProperty(CUITControls.HtmlControl.PropertyNames.Type, "PASSWORD"); }
/// <summary> /// Initializes a new instance of the <see cref="HtmlHeading1"/> class. /// </summary> /// <param name="searchConfiguration">The search configuration.</param> public HtmlHeading1(By searchConfiguration = null) : this(new CUITControls.HtmlCustom(), searchConfiguration) { }
/// <summary> /// Initializes a new instance of the <see cref="HtmlListItem"/> class. /// </summary> /// <param name="sourceControl">The source control.</param> /// <param name="searchConfiguration">The search configuration.</param> public HtmlListItem(CUITControls.HtmlCustom sourceControl, By searchConfiguration = null) : base(sourceControl, searchConfiguration) { }
/// <summary> /// Initializes a new instance of the <see cref="HtmlListItem"/> class. /// </summary> /// <param name="searchConfiguration">The search configuration.</param> public HtmlListItem(By searchConfiguration = null) : this(new CUITControls.HtmlCustom(), searchConfiguration) { }
/// <summary> /// Initializes a new instance of the <see cref="SilverlightPassword" /> class. /// </summary> /// <param name="parent">The parent.</param> /// <param name="searchConfiguration">The search configuration.</param> public SilverlightPassword(UITestControl parent, By searchConfiguration = null) : this(new CUITControls.SilverlightEdit(parent), searchConfiguration) { }
/// <summary> /// Initializes a new instance of the <see cref="SilverlightPassword"/> class. /// </summary> /// <param name="searchConfiguration">The search configuration.</param> public SilverlightPassword(By searchConfiguration = null) : this(new CUITControls.SilverlightEdit(), searchConfiguration) { }
/// <summary> /// Initializes a new instance of the <see cref="SilverlightPassword"/> class. /// </summary> /// <param name="sourceControl">The source control.</param> /// <param name="searchConfiguration">The search configuration.</param> public SilverlightPassword(CUITControls.SilverlightEdit sourceControl, By searchConfiguration = null) : base(sourceControl, searchConfiguration) { }
/// <summary> /// Initializes a new instance of the <see cref="HtmlParagraph"/> class. /// </summary> /// <param name="searchConfiguration">The search configuration.</param> public HtmlParagraph(By searchConfiguration = null) : this(new CUITControls.HtmlCustom(), searchConfiguration) { }
/// <summary> /// Adds a mechanism to find controls by specified part of the automation id. /// </summary> /// <param name="automationIdPart">The part of the automation id.</param> /// <returns> /// The mechanisms by how particular instances of <see cref="UITestControl"/> are found in /// the UI. /// </returns> public static By AutomationIdContains(string automationIdPart) { var by = new By(); by.configurators.Add(new AutomationIdConfigurator(automationIdPart, PropertyExpressionOperator.Contains)); return by; }
/// <summary> /// Initializes a new instance of the <see cref="HtmlHeading1"/> class. /// </summary> /// <param name="sourceControl">The source control.</param> /// <param name="searchConfiguration">The search configuration.</param> public HtmlHeading1(CUITControls.HtmlCustom sourceControl, By searchConfiguration = null) : base(sourceControl, searchConfiguration) { AddSearchProperty(CUITControls.HtmlControl.PropertyNames.TagName, TagName); }
/// <summary> /// Initializes a new instance of the <see cref="HtmlPassword"/> class. /// </summary> /// <param name="searchConfiguration">The search configuration.</param> public HtmlPassword(By searchConfiguration = null) : this(new CUITControls.HtmlEdit(), searchConfiguration) { }