public static string GetValue(this AccessibleNode node) { var firstOrDefault = node.GetProperties(PropertyOptions.AccessibleContextInfo).FirstOrDefault(x => x.Name == "Name"); if (firstOrDefault != null) { return((string)firstOrDefault.Value); } return(null); }
private string FindNodePropertyValue(AccessibleNode node, string name) { var properties = node.GetProperties(PropertyOptions.AccessibleContextInfo); foreach (var property in properties) { if (property.Name == name) { return((string)property.Value); } } return(null); }
public JavaUiNode(AccessibleNode accessibleNode) { this.accessibleNode = accessibleNode; var propertyList = accessibleNode.GetProperties(PropertyOptions.AccessibleContextInfo | PropertyOptions.ObjectDepth); foreach (var item in propertyList) { if (item.Name != null) { propObjectDict[item.Name] = item.Value; propDict[item.Name] = item.Value == null ? "" : item.Value.ToString(); } } }
private void FindCommodityMarketNode(AccessibleNode node) { var properties = node.GetProperties(PropertyOptions.AccessibleContextInfo); foreach (var property in properties) { if (property.Name == "Role" && (string)property.Value == "table" && ((AccessibleContextNode)node).GetInfo().childrenCount > 100) { _commodityNode = (AccessibleContextNode)node; } } var children = node.GetChildren(); foreach (var child in children) { FindCommodityMarketNode(child); } }