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(); }
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; }
public static HtmlTag Div(this HtmlTag tag, Action<HtmlTag> configure) { var div = new HtmlTag("div"); configure(div); return tag.Child(div); }
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)); }
public static SkillSheet FindSkillSheet(this XmlNode xn) { return new SkillSheet(xn.Child(SKILL_SHEET)); }
public static string GetOperator(this Racr.AstNode n) { return n.Child<string>("operator"); }
public static string GetT(this Racr.AstNode n) { return n.Child<string>("t"); }
public static object GetValue(this Racr.AstNode n) { return n.Child<object>("value"); }
public static ValueTypes GetValueType(this Racr.AstNode n) { return n.Child<ValueTypes>("type"); }
public static string GetLabel(this Racr.AstNode n) { return n.Child<string>("label"); }
public static string GetName(this Racr.AstNode n) { return n.Child<string>("name"); }
public static Racr.AstNode GetExpression(this Racr.AstNode n) { return n.Child("Expression"); }
// AST Accessors public static Racr.AstNode GetBody(this Racr.AstNode n) { return n.Child("Body"); }
public static HtmlTag Span(this HtmlTag tag, Action<HtmlTag> configure) { var span = new HtmlTag("span"); configure(span); return tag.Child(span); }
public static Racr.AstNode GetOperands(this Racr.AstNode n) { return n.Child("Operands"); }
public static Racr.AstNode GetList(this Racr.AstNode n) { return n.Child("List"); }