Exemplo n.º 1
0
        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();
        }
Exemplo n.º 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;
        }
Exemplo n.º 3
0
    public static HtmlTag Div(this HtmlTag tag, Action<HtmlTag> configure)
    {
        var div = new HtmlTag("div");
            configure(div);

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