Solved
Forum Discussion
shankar_r
9 years agoCommunity Hero
Hi,
If i was in that situation, i will do like below:
var mainMenu = page.Find("idStr", "mainMenuInner", 10, 1000);
var navMenu = page.Find("idStr","navMenuInner", 10, 1000);
var menuObject = null;
if(mainMenu.Exists)
{
menuObject = mainMenu;
Log.Message("selected the object with idStr as mainMenuIner");
}
else if(navMenu.Exists)
{
menuObject = navMenu)
Log.Message("selected the object with idStr as navMenuInner");
}
//Here use if to check whether that has object or not
if(menuObject != null)
{
//Do your stuff
}royd
9 years agoRegular Contributor
Thank you Shankar, I'll give it a try and let you know how it goes.
Good to see you.
Dave