Hi Team,
New to this forum and to ranorex. Presently evaluating ranorex and found good tool.
I am using TryFindSingle to check existance of my object as follows.
Ranorex.Core.Element elem = null;
bool isBtnAvailable = editDig.TryFindSingle("xpathtoElement", out elem);
But this is not giving expected result to me. Is this right code? What should be the second argument expected here? In my case I gave 'out elem' looking at some examples on your site. What is out here?
Please forgive me for dumb questions.
Thanks,
Dimbre.
help on TryFindSingle
Re: help on TryFindSingle
If the item is found then elem will be set to that item and you can use it.
Example -
Example -
Code: Select all
Ranorex.Button btn = null;
if(Host.Local.TryFindSingle("rxPath", 10000, out btn){
//path was found and you have a valid adapter
btn.Click();
}else{
Report.Info(rxPath + " didn't exist");
}
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: help on TryFindSingle
Thankyou very much for quick reply. I will try and keep you posted on this.