How to identify element (OK button) on Form and click on it, here is my the path-
/form[@title='Windows Internet Explorer']/button[@text='OK']
Element
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Element
Hi,
to identify and click on an element you can use following code:
http://www.ranorex.com/support/user-gui ... mples.html
Regards,
Tobias
Support Team
to identify and click on an element you can use following code:
Button okButton = "/form[@title='Windows Internet Explorer']/button[@text='OK']"; okButton.Click();For further information please have a look at our user guide:
http://www.ranorex.com/support/user-gui ... mples.html
Regards,
Tobias
Support Team
Re: Element
Thank you Tobias, this worked-
Ranorex.Button button=null;
if (Host.Local.TryFindSingle("/form[@title='Windows Internet Explorer']/button[@text='OK']", 10000, out button))
Report.Screenshot("/form[@title='Windows Internet Explorer']");
button.Click();
throw new RanorexException("text");
}
-Beginner
Ranorex.Button button=null;
if (Host.Local.TryFindSingle("/form[@title='Windows Internet Explorer']/button[@text='OK']", 10000, out button))
Report.Screenshot("/form[@title='Windows Internet Explorer']");
button.Click();
throw new RanorexException("text");
}
-Beginner
Tipu