I would like to check the order of the menus. So, I have e.g. to test if the element I get from Childrens is a seperator. But how can I check this?
With is or as it doesn't works because Ranorex.Core.Element and Ranorex.Seperator doesn't inherit from the same base class. The only way I know to check is this not really nice way:
Code: Select all
try
{
Ranorex.Seperator sep = (Ranorex.Seperator) item.Children[x];
return true;
}
catch(InvalidCastException)
{
return false;
}
Regards, Alex