Forum Discussion
shankar_r
8 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 }
- royd8 years agoRegular Contributor
Thank you Shankar, I'll give it a try and let you know how it goes.
Good to see you.
Dave
Related Content
- 10 years ago
- 5 years ago
- 5 years ago
Recent Discussions
- 10 hours ago
- 7 days ago
- 10 days ago