public static void ComboSelectItem(this AutomationElement combo, Expression<Func<AutomationElement, bool>> itemCondition)
        {
            combo.Pattern<ExpandCollapsePattern>().Expand();

            var item = combo.Child(itemCondition);

            item.Pattern<SelectionItemPattern>().Select();

            combo.Pattern<ExpandCollapsePattern>().Collapse();
        }
Beispiel #2
0
        public static IControl Add(this IList<IControl> controls, Guid? parentControlId, IControl controlToAdd)
        {
            if (parentControlId.HasValue)
            {
                controls.Child(parentControlId.Value).Controls.Add(controlToAdd);
            }
            else
            {
                controls.Add(controlToAdd);
            }

            return controlToAdd;
        }
Beispiel #3
0
    public static HtmlTag Div(this HtmlTag tag, Action<HtmlTag> configure)
    {
        var div = new HtmlTag("div");
            configure(div);

            return tag.Child(div);
    }
Beispiel #4
0
    public static LinkTag ActionLink(this HtmlTag tag, string text, params string[] classes)
    {
        var child = new LinkTag(text, "#", classes);
            tag.Child(child);

            return child;
    }
 public static string ChildText(this XElement x, string childNodeName)
 {
     return (string)(x.Child(childNodeName));
 }
Beispiel #6
0
 public static SkillSheet FindSkillSheet(this XmlNode xn)
 {
     return new SkillSheet(xn.Child(SKILL_SHEET));
 }
Beispiel #7
0
	public static string GetOperator(this Racr.AstNode n) { return n.Child<string>("operator"); }
Beispiel #8
0
	public static string GetT(this Racr.AstNode n) { return n.Child<string>("t"); }
Beispiel #9
0
	public static object GetValue(this Racr.AstNode n) { return n.Child<object>("value"); }
Beispiel #10
0
	public static ValueTypes GetValueType(this Racr.AstNode n) { return n.Child<ValueTypes>("type"); }
Beispiel #11
0
	public static string GetLabel(this Racr.AstNode n) { return n.Child<string>("label"); }
Beispiel #12
0
	public static string GetName(this Racr.AstNode n) { return n.Child<string>("name"); }
Beispiel #13
0
	public static Racr.AstNode GetExpression(this Racr.AstNode n) { return n.Child("Expression"); }
Beispiel #14
0
	// AST Accessors
	public static Racr.AstNode GetBody(this Racr.AstNode n) { return n.Child("Body"); }
Beispiel #15
0
 public static HtmlTag Span(this HtmlTag tag, Action<HtmlTag> configure)
 {
     var span = new HtmlTag("span");
         configure(span);
         return tag.Child(span);
 }
Beispiel #16
0
	public static Racr.AstNode GetOperands(this Racr.AstNode n) { return n.Child("Operands"); }
Beispiel #17
0
	public static Racr.AstNode GetList(this Racr.AstNode n) { return n.Child("List"); }