void test2() { foreach (AutomationElement edgegroup in AutomationElement.RootElement.FindAll(TreeScope.Children, PropertyCondition.TrueCondition)) { if (!edgegroup.Current.Name.Contains("Edge")) continue; this.textBox1.Text += Environment.NewLine; this.textBox1.Text += Environment.NewLine + "edgegroup title:" + edgegroup.Current.Name; foreach (AutomationElement edgewin in edgegroup.FindAll(TreeScope.Children, PropertyCondition.TrueCondition)) { if (edgewin.Current.ClassName != "Windows.UI.Core.CoreWindow") continue; this.textBox1.Text += " "+Environment.NewLine + "ClassName:" + edgewin.Current.ClassName; foreach (AutomationElement edgetab in edgewin.FindAll(TreeScope.Children, PropertyCondition.TrueCondition)) { if (edgetab.Current.ClassName != "GridViewItem") continue; this.textBox1.Text +=" "+ Environment.NewLine + "ClassName:" + edgetab.Current.ClassName; this.textBox1.Text += " " + Environment.NewLine + "Name:" + edgetab.Current.Name; } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)