Ejemplo n.º 1
0
        /// <summary>
        /// Find UI Element By Using Expression (DSL)
        /// </summary>
        /// <param name="Order">Specifies Order of Chained Look-Up, Does Not Have to be Sequential Or Start at 0 or Are Local to PlaceHolder.</param>
        /// <param name="Expression">Simple Boolean Expression Tree</param>
        /// <param name="Scope">Scope of Search</param>
        public FindByAttribute(int Order, String Expression, Scope Scope = Scope.ChildrenOnly)
        {
            _order = Order;

            _locator = new ExpressionLocator(String.Empty, _order, Scope, Expression);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Find UI Element By Using And/Or Property Condition KeyValue Pairs.
        /// </summary>
        /// <param name="Order">Specifies Order of Chained Look-Up, Does Not Have to be Sequential Or Start at 0 or Are Local to PlaceHolder.</param>
        /// <param name="How">Specifies the Method Used to Find Controls.</param>
        /// <param name="Scope">Scope of Search</param>
        /// <param name="PropertyValuePairs">Key Value Pairs. Equals: Property==Value or Property=Value. Not Equals: Property!=Value or Property&lt;&gt;Value.</param>
        public FindByAttribute(int Order, How How, Scope Scope = Scope.ChildrenOnly, params String[] PropertyValuePairs)
        {
            _order = Order;

            if (How == How.AndProperty)
            {
                _locator = new ChainedLocator(String.Empty, _order, Scope, ChainedLocator.ConditionType.And,
                                                PropertyValuePairs);
            }
            else if (How == How.OrProperty)
            {
                _locator = new ChainedLocator(String.Empty, _order, Scope, ChainedLocator.ConditionType.Or,
                                                PropertyValuePairs);
            }
            else
            {
                throw new ArgumentException("Invalid How, for Key Value Conditions How Must Equal And or Or!");
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Find UI Element By Using Locators from a Well Known Place Holder.
 /// </summary>
 /// <param name="Parent">Name of a Well Known Place Holder, a Field/Property with WellKnownAs Attribute. (Always Selected as First FindBy).</param>
 public FindByAttribute(String Parent)
 {
     _locator = new WellKnownReferenceLocator(Parent);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Find Element By Using Common Property Conditions.
        /// </summary>
        /// <param name="Order">Specifies Order of Chained Look-Up, Does Not Have to be Sequential Or Start at 0 or Are Local to PlaceHolder.</param>
        /// <param name="How">Specifies the Method Used to Find Controls.</param>
        /// <param name="Using">Used as a Parameter to the Specified 'How' Method.</param>
        /// <param name="Scope">Scope of Search</param>
        /// <param name="ControlType">ControlType Specifies System.Windows.Automation.ControlType as String</param>
        public FindByAttribute(int Order, How How, String Using, Scope Scope = Scope.ChildrenOnly,
                               String ControlType = "")
        {
            _order = Order;

            _locator = new SimpleLocator(String.Empty, _order, Scope, How, Using, ControlType);
        }