Hi,
I have a navigation tree in the application. And i'm using selenium with c# to test the application in Edge browser, IE11 and Chrome.
If i click on the nav tree element say Home(hyperlink), it takes me to a page called Home. However if I click on the div encapsulating the Home element, it expands the navigation tree. So my requirement is to click on the div just outside the hyperlink in
the navigation tree element.
Here is code snippet to do the same
var elements = TreeView.FindElement(By.LinkText("Home"));
int count = element.FindElements(By.XPath("..")).Count; - (gives count as 1 in all three browsers)
element.FindElement(By.XPath("..")).Click(); -(click happens in IE and Chrome, however fails in Edge)
Exception says element not visible.
Please suggest me a possible solution.
Also could you suggest why this could be failing in Edge and passing in the other two browsers?
Could it be possible that in Chome and IE, it is clicking on the visible part of the div encapsulating the hyperlink. Whereas in Edge, it is clicking on the center of the div?
Thanks & Regards
Sandeep P Raju