Unable to click on a page links via HREF, but can click via link text
As we have a different version of the website where we have different languages so can't hard code the link text as it is different for each but links HREF is the same throughout. I have tried to sync both chrome driver and chrome browser version but it is stated Driver 74.0.3729.6 is for chrome 74. session is started just the links click issue.
public OrderPage NavigateOrder()
{
var homeHyperlink = new HtmlHyperlink(_browserWindow);
homeHyperlink.SearchProperties[HtmlHyperlink.PropertyNames.AbsolutePath] = PageLinks.OrderHref;
Mouse.Click(homeHyperlink);
return new OrderPage(_browserWindow);
}
This code is working,
public OrderPage NavigateOrder()
{
string keyToSearch = "Orders";
var link = FindHtmlHyerlink(keyToSearch);
Mouse.Click(link);
return new OrderPage(_browserWindow);
}
HREF code was working perfectly before this version updates, I am getting this exception at mouse.click()
Message: Test method WebUI.CodedUI.Test.OrderTests.AmountExceed threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: element not interactable
(Session info: chrome=74.0.3729.157)
(Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Windows NT 10.0.17134 x86_64)