I'm writing all of my automation in Visual Studio 2010, including the declaration of all my objects.
Because I don't have an "ObjectInfo" I can't use .exists. I want to write a method to do so. Currently, for each case I will write something like:
Code: Select all
Ranorex.Button aButton;
var closedButtonExists = Host.Local.TryFindSingle("/form...", 2000, out aButton);
if (closedButtonExists)
{
aButton.Click();
}
Essentially what I'm looking at is:
Code: Select all
public bool ObjectExists(Ranorex.Object myObject, string myXpath)
{
Ranorex.myObject someObject;
var doIExist = ...
}
Thanks,
Jason