Before printing the link text check the visibility of the link. Use isDisplayed() method.
There are total 4 links but its printing only one when take size of the Web elements. Is there anything wrong in it?
I will try using displayed and I will get you.
Thanks
Sam
Hi Mohith,
I tried using isDisplayed. But it still giving me the same result. And size also wrong as it should be 4.
I am doing mistake somewhere, but could not find it. Any more suggestions.
thanks in advance
Sam
that was my mistake.
Got it now.
Here is the new code
List<WebElement> personalLinks = driver.findElements(By.xpath(".//*[@class=wg-c-nav-internal__list']/a"));
I did not give right xpath as I gave to find only one element.
Thanks
Sam