/// <summary> /// Adds a mechanism to find controls by specified id. /// </summary> /// <param name="id">The 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 By AndId( string id, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { configurators.Add(new IdConfigurator(id, conditionOperator)); return(this); }
/// <summary> /// Adds a mechanism to find controls by specified value attribute. /// </summary> /// <param name="valueAttribute">The value attribute.</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 By AndValueAttribute( string valueAttribute, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { configurators.Add(new ValueAttributeConfigurator(valueAttribute, conditionOperator)); return(this); }
/// <summary> /// Adds a mechanism to find controls by specified name. /// </summary> /// <param name="tagName">The tag name.</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 By AndTagName( string tagName, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { configurators.Add(new TagNameConfigurator(tagName, conditionOperator)); return(this); }
/// <summary> /// Adds a mechanism to find controls by specified class. /// </summary> /// <param name="class">The class.</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 By AndClass( string @class, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { configurators.Add(new ClassConfigurator(@class, conditionOperator)); return(this); }
/// <summary> /// Initializes a new instance of the <see cref="ValueAttributeConfigurator"/> class. /// </summary> /// <param name="valueAttribute">The value attribute.</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> internal ValueAttributeConfigurator(string valueAttribute, PropertyExpressionOperator conditionOperator) { if (valueAttribute == null) throw new ArgumentNullException("valueAttribute"); this.valueAttribute = valueAttribute; this.conditionOperator = conditionOperator; }
/// <summary> /// Initializes a new instance of the <see cref="ClassConfigurator"/> class. /// </summary> /// <param name="class">The class.</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> internal ClassConfigurator(string @class, PropertyExpressionOperator conditionOperator) { if (@class == null) throw new ArgumentNullException("class"); this.@class = @class; this.conditionOperator = conditionOperator; }
/// <summary> /// Initializes a new instance of the <see cref="AutomationIdConfigurator"/> class. /// </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> internal AutomationIdConfigurator(string automationId, PropertyExpressionOperator conditionOperator) { if (automationId == null) throw new ArgumentNullException("automationId"); this.automationId = automationId; this.conditionOperator = conditionOperator; }
/// <summary> /// Initializes a new instance of the <see cref="NameConfigurator"/> class. /// </summary> /// <param name="name">The name.</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> internal NameConfigurator(string name, PropertyExpressionOperator conditionOperator) { if (name == null) throw new ArgumentNullException("name"); this.name = name; this.conditionOperator = conditionOperator; }
/// <summary> /// Initializes a new instance of the <see cref="IdConfigurator"/> class. /// </summary> /// <param name="id">The 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> internal IdConfigurator(string id, PropertyExpressionOperator conditionOperator) { if (id == null) throw new ArgumentNullException("id"); this.id = id; this.conditionOperator = conditionOperator; }
/// <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; }
/// <summary> /// Initializes a new instance of the <see cref="TagNameConfigurator"/> class. /// </summary> /// <param name="tagName">The tag name.</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> internal TagNameConfigurator(string tagName, PropertyExpressionOperator conditionOperator) { if (tagName == null) throw new ArgumentNullException("tagName"); this.tagName = tagName; this.conditionOperator = conditionOperator; }
/// <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); }
/// <summary> /// Initializes a new instance of the <see cref="NameConfigurator"/> class. /// </summary> /// <param name="name">The name.</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> internal NameConfigurator(string name, PropertyExpressionOperator conditionOperator) { if (name == null) { throw new ArgumentNullException("name"); } this.name = name; this.conditionOperator = conditionOperator; }
/// <summary> /// Initializes a new instance of the <see cref="AutomationIdConfigurator"/> class. /// </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> internal AutomationIdConfigurator(string automationId, PropertyExpressionOperator conditionOperator) { if (automationId == null) { throw new ArgumentNullException("automationId"); } this.automationId = automationId; this.conditionOperator = conditionOperator; }
/// <summary> /// Initializes a new instance of the <see cref="ClassConfigurator"/> class. /// </summary> /// <param name="class">The class.</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> internal ClassConfigurator(string @class, PropertyExpressionOperator conditionOperator) { if (@class == null) { throw new ArgumentNullException("class"); } this.@class = @class; this.conditionOperator = conditionOperator; }
/// <summary> /// Initializes a new instance of the <see cref="ValueAttributeConfigurator"/> class. /// </summary> /// <param name="valueAttribute">The value attribute.</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> internal ValueAttributeConfigurator(string valueAttribute, PropertyExpressionOperator conditionOperator) { if (valueAttribute == null) { throw new ArgumentNullException("valueAttribute"); } this.valueAttribute = valueAttribute; this.conditionOperator = conditionOperator; }
/// <summary> /// Initializes a new instance of the <see cref="IdConfigurator"/> class. /// </summary> /// <param name="id">The 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> internal IdConfigurator(string id, PropertyExpressionOperator conditionOperator) { if (id == null) { throw new ArgumentNullException("id"); } this.id = id; this.conditionOperator = conditionOperator; }
/// <summary> /// Gets a search control that is able to find Html tags when the /// specified tag name /// </summary> /// <param name="parent"> /// The parent control from which to start searching /// </param> /// <param name="tagName"> /// The tag name this control represents /// </param> /// <param name="expressionOperator"> /// The expression operator used when comparing tag names /// </param> public HtmlCustomTag(UITestControl parent, string tagName, PropertyExpressionOperator expressionOperator = PropertyExpressionOperator.EqualTo) : base(parent) { if (String.IsNullOrWhiteSpace(tagName)) { throw new ArgumentException("Tag name cannot be null, empty, or white space.", nameof(tagName)); } this._tagName = tagName; this._expressionOperator = expressionOperator; this.SearchProperties.Add(PropertyNames.TagName, this._tagName, this._expressionOperator); }
/// <summary> /// Initializes a new instance of the <see cref="SearchConfigurator" /> class. /// </summary> /// <param name="propertyName">The name of the property.</param> /// <param name="propertyValue">The property value.</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> protected SearchConfigurator(string propertyName, string propertyValue, PropertyExpressionOperator conditionOperator) { if (propertyName == null) throw new ArgumentNullException("propertyName"); if (propertyValue == null) throw new ArgumentNullException("propertyValue"); this.propertyName = propertyName; this.propertyValue = propertyValue; this.conditionOperator = conditionOperator; }
/// <summary> /// Adds a search property by using the provided property name, value, and operator. /// </summary> /// <param name="propertyName">The name of the property.</param> /// <param name="propertyValue">The property value to search for.</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> internal void AddSearchProperty( string propertyName, string propertyValue, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { var searchProperties = new PropertyExpressionCollection { new PropertyExpression(propertyName, propertyValue, conditionOperator) }; AddSearchProperties(searchProperties); }
private void SetupInstanceForCodedUISelector(string searchProperties) { var controlProperties = GetAllPropertyNames(); // Split on groups of key/value pairs string[] saKeyValuePairs = searchProperties.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); foreach (string sKeyValue in saKeyValuePairs) { PropertyExpressionOperator compareOperator = PropertyExpressionOperator.EqualTo; // If split on '=' does not work, then try '~' // Split at the first instance of '='. Other instances are considered part of the value. string[] saKeyVal = sKeyValue.Split(new char[] { '=' }, 2); if (saKeyVal.Length != 2) { // Otherwise try to split on '~'. If it works then compare type is Contains // Split at the first instance of '~'. Other instances are considered part of the value. saKeyVal = sKeyValue.Split(new char[] { '~' }, 2); if (saKeyVal.Length == 2) { compareOperator = PropertyExpressionOperator.Contains; } else { throw new HighwayInsuranceInvalidSearchParameterFormat(searchProperties); } } // Find the first property in the list of known values string valueName = saKeyVal[0]; if ((typeof(T).IsSubclassOf(typeof(HtmlControl))) && (valueName.Equals("Value", StringComparison.OrdinalIgnoreCase))) { //support for backward compatibility where search properties like "Value=Log In" are used valueName += "Attribute"; } FieldInfo foundField = controlProperties.Find( searchProperty => searchProperty.Name.Equals(valueName, StringComparison.OrdinalIgnoreCase)); if (foundField == null) { throw new HighwayInsuranceInvalidSearchKey(valueName, searchProperties, controlProperties.Select(x => x.Name).ToList()); } // Add the search property, value and type this.SearchProperties.Add(foundField.GetValue(null).ToString(), saKeyVal[1], compareOperator); } }
public static WpfWindow GetWindow(this WpfWindow parent, string windowTitle, bool exactMatch = false) { PropertyExpressionOperator expressionOperator = exactMatch ? PropertyExpressionOperator.EqualTo : PropertyExpressionOperator.Contains; var modalWindow = new WpfWindow { SearchProperties = { { UITestControl.PropertyNames.Name, windowTitle, expressionOperator } } }; modalWindow.Find(); return(modalWindow); }
/// <summary> /// Initializes a new instance of the <see cref="SearchConfigurator" /> class. /// </summary> /// <param name="propertyName">The name of the property.</param> /// <param name="propertyValue">The property value.</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> protected SearchConfigurator(string propertyName, string propertyValue, PropertyExpressionOperator conditionOperator) { if (propertyName == null) { throw new ArgumentNullException("propertyName"); } if (propertyValue == null) { throw new ArgumentNullException("propertyValue"); } this.propertyName = propertyName; this.propertyValue = propertyValue; this.conditionOperator = conditionOperator; }
/// <summary> /// Adds a mechanism to find controls by specified class. /// </summary> /// <param name="class">The class.</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 Class( string @class, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { return(new By().AndClass(@class, conditionOperator)); }
/// <summary> /// Initializes a new instance of the <see cref="IdConfigurator"/> class. /// </summary> /// <param name="id">The 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> internal IdConfigurator(string id, PropertyExpressionOperator conditionOperator) : base(HtmlControl.PropertyNames.Id, id, conditionOperator) { }
/// <summary> /// Adds a mechanism to find controls by specified class. /// </summary> /// <param name="class">The class.</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 Class( string @class, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { return new By().AndClass(@class, conditionOperator); }
/// <summary> /// Initializes a new instance of the <see cref="ValueAttributeConfigurator"/> class. /// </summary> /// <param name="valueAttribute">The value attribute.</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> internal ValueAttributeConfigurator(string valueAttribute, PropertyExpressionOperator conditionOperator) : base(HtmlControl.PropertyNames.ValueAttribute, valueAttribute, conditionOperator) { }
/// <summary> /// Initializes a new instance of the <see cref="ControlTypeConfigurator"/> class. /// </summary> /// <param name="controlType">The control type.</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> internal ControlTypeConfigurator(string controlType, PropertyExpressionOperator conditionOperator) : base(UITestControl.PropertyNames.ControlType, controlType, conditionOperator) { }
public void Add(string propertyName, string propertyValue, PropertyExpressionOperator conditionOperator) { Add(new PropertyExpression(propertyName, propertyValue, conditionOperator)); }
/// <summary> /// Adds a mechanism to find controls by specified tag name. /// </summary> /// <param name="tagName">The tag name.</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 TagName( string tagName, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { return(new By().AndTagName(tagName, conditionOperator)); }
/// <summary> /// Initializes a new instance of the <see cref="InstanceConfigurator"/> class. /// </summary> /// <param name="instance">The control instance (1-based).</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> internal InstanceConfigurator(string instance, PropertyExpressionOperator conditionOperator) : base(WinControl.PropertyNames.Instance, instance, conditionOperator) { }
/// <summary> /// Adds a mechanism to find controls by specified id. /// </summary> /// <param name="id">The 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 Id( string id, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { return new By().AndId(id, conditionOperator); }
/// <summary> /// Adds a mechanism to find controls by specified tag name. /// </summary> /// <param name="tagName">The tag name.</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 TagName( string tagName, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { return new By().AndTagName(tagName, conditionOperator); }
/// <summary> /// Initializes a new instance of the <see cref="ControlNameConfigurator"/> class. /// </summary> /// <param name="controlName">The control name.</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> internal ControlNameConfigurator(string controlName, PropertyExpressionOperator conditionOperator) : base(WinControl.PropertyNames.ControlName, controlName, conditionOperator) { }
/// <summary> /// Adds a mechanism to find controls by specified value attribute. /// </summary> /// <param name="valueAttribute">The value attribute.</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 ValueAttribute( string valueAttribute, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { return new By().AndValueAttribute(valueAttribute, conditionOperator); }
/// <summary> /// Adds a mechanism to find controls by specified value attribute. /// </summary> /// <param name="valueAttribute">The value attribute.</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 ValueAttribute( string valueAttribute, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { return(new By().AndValueAttribute(valueAttribute, conditionOperator)); }
/// <summary> /// Adds a mechanism to find controls by specified value attribute. /// </summary> /// <param name="valueAttribute">The value attribute.</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 By AndValueAttribute( string valueAttribute, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { configurators.Add(new ValueAttributeConfigurator(valueAttribute, conditionOperator)); return this; }
public PropertyExpression(AutomationProperty propertyName, object propertyValue, PropertyExpressionOperator propertyOperator) { PropertyName = propertyName; PropertyValue = propertyValue; PropertyOperator = propertyOperator; }
/// <summary> /// Creates a search control that finds the first child control /// of type T from the given parent that matches some property /// name and value pair using the specified operator /// </summary> /// <typeparam name="T"> /// The type of control to find /// </typeparam> /// <param name="parent"> /// The UITestControl from which to start searching /// </param> /// <param name="propertyName"> /// The name of the property whose value should be compared /// </param> /// <param name="propertyValue"> /// The value against which the specified property should be compared /// </param> /// <param name="expressionOperator"> /// The operater used to compare the property value /// </param> /// <returns> /// A search control that finds the first child control /// of type T from the given parent that matches some property /// name and value pair using the specified operator /// </returns> public static T Find <T>(this UITestControl parent, string propertyName, string propertyValue, PropertyExpressionOperator expressionOperator) where T : UITestControl, new() { return(parent.Find <T>(new PropertyExpression { PropertyName = propertyName, PropertyValue = propertyValue, PropertyOperator = expressionOperator })); }
/// <summary> /// Initializes a new instance of the <see cref="ClassConfigurator"/> class. /// </summary> /// <param name="class">The class.</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> internal ClassConfigurator(string @class, PropertyExpressionOperator conditionOperator) : base(HtmlControl.PropertyNames.Class, @class, conditionOperator) { }
/// <summary> /// Extends the search properties of the current UITestControl /// and returns that search control with the additional property /// </summary> /// <typeparam name="T"> /// Type of control to find /// </typeparam> /// <param name="current"> /// The UITestControl to extend /// </param> /// <param name="propertyName"> /// The name of the property whose value should be compared /// </param> /// <param name="propertyValue"> /// The value against which the specified property should be compared /// </param> /// <param name="expressionOperator"> /// The operater used to compare the property value /// </param> /// <returns> /// The current UITestControl with the additional search property /// </returns> public static T Extend <T>(this T current, string propertyName, string propertyValue, PropertyExpressionOperator expressionOperator) where T : UITestControl { current.SearchProperties.Add(propertyName, propertyValue, expressionOperator); return(current); }
/// <summary> /// Initializes a new instance of the <see cref="TagNameConfigurator"/> class. /// </summary> /// <param name="tagName">The tag name.</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> internal TagNameConfigurator(string tagName, PropertyExpressionOperator conditionOperator) : base(HtmlControl.PropertyNames.TagName, tagName, conditionOperator) { }
public PropertyExpression(string propertyName, string propertyValue, PropertyExpressionOperator propertyOperator) : this(propertyName, propertyValue) { PropertyOperator = propertyOperator; }
/// <summary> /// Adds a mechanism to find controls by specified name. /// </summary> /// <param name="tagName">The tag name.</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 By AndTagName( string tagName, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { configurators.Add(new TagNameConfigurator(tagName, conditionOperator)); return this; }
/// <summary> /// Initializes a new instance of the <see cref="NameConfigurator"/> class. /// </summary> /// <param name="name">The name.</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> internal NameConfigurator(string name, PropertyExpressionOperator conditionOperator) : base(UITestControl.PropertyNames.Name, name, conditionOperator) { }
/// <summary> /// Adds a mechanism to find controls by specified class. /// </summary> /// <param name="class">The class.</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 By AndClass( string @class, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { configurators.Add(new ClassConfigurator(@class, conditionOperator)); return this; }
/// <summary> /// Initializes a new instance of the <see cref="AutomationIdConfigurator"/> class. /// </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> internal AutomationIdConfigurator(string automationId, PropertyExpressionOperator conditionOperator) : base(WpfControl.PropertyNames.AutomationId, automationId, conditionOperator) { }
/// <summary> /// Adds a mechanism to find controls by specified id. /// </summary> /// <param name="id">The 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 By AndId( string id, PropertyExpressionOperator conditionOperator = PropertyExpressionOperator.EqualTo) { configurators.Add(new IdConfigurator(id, conditionOperator)); return this; }