There are few hyper links in our web page and they look like a tabs. When I click any of them respective section displays and background of the link changes so that we know the tab has been selected. When I spy I can see that 'class' property as 'Selected' and I would like to use the same thing in my code to make sure navigation is successful.
Here goes my code.
Code: Select all
Ranorex.ATag mppElement = objRepo.HomePage.Self.FindSingle<Ranorex.ATag>(".//a[@InnerText='" + tabName +"']",2000);
mppElement.Click();
If(mppElement.Class=="Selected")
{
//my Reporting
}
Interestingly, If tab was already selected then this code can click the tab again and can see the class as 'Selected'.
Thanks,
Suraj