Ranorex学习记录

Ranorex.Button Button1=Host.Local.FindSingle("/form[@title='文本']/button[@text='文本']");
Button1.Click();
Report.Info("输出:"+Button1.Text);
        	
IList buttonList=repo.dlg.btn.Find("/form[@title='']/button");
foreach (Ranorex.ComboBox bt in buttonList)
{   
    Report.Screenshot(bt);   
}  
			
int Num=repo.dlg.Tree.DescendantItems.Count;
Report.Info("输出:"+Num);
			
Type button2=repo.dlg.Tree.Children.GetType();
Report.Info("输出:"+button2.Name);
Report.Info("输出:"+button2.Namespace);  
              
Ranorex.Button Button3=Host.Local.TryFindSingle("/form[@title='文本']/button[@text='文本']");
Button1.Click();
Report.Info("尝试查找路径:"+Button3.Text);

repo.dlg.Tree.FindChild

你可能感兴趣的:(学习记录,Ranorex)