示例#1
0
        /// <summary>
        /// Creates a TextBox element
        /// </summary>
        /// <returns></returns>
        public ElementBuilder CreateTextBox()
        {
            _innerElement = new TestBasicAutomationElement {
                ControlType = FlaUI.Core.Definitions.ControlType.Text
            };
            _innerElement.SetPropertyValue(AutomationObjectIds.IsPasswordProperty.Id, false);

            _element = new TextBox(_innerElement);

            return(this);
        }
示例#2
0
        /// <summary>
        /// Sets a property value.
        /// </summary>
        /// <param name="propertyId">The Id of the property. e.g. "AutomationObjectIds.NameProperty.Id"</param>
        /// <param name="value">The value of the property</param>
        public ElementBuilder WithPropertyValue(int propertyId, object value)
        {
            _innerElement.SetPropertyValue(propertyId, value);

            return(this);
        }