0

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) enter image description here

Gkm
  • 237
  • 1
  • 5
  • 19
  • @DebanjanB, this question is not above element visible or not, rather it is an issue related to updating of the chrome browser version. – Gkm Jun 07 '19 at 07:10
  • Why do you feel _...issue related to updating of the chrome browser version..._? Can you update the question with the error stack trace? Did you have a look at the duplicate target atleast once? – undetected Selenium Jun 07 '19 at 07:18
  • Yes obviously after looking the question I said it is not relevant, because the code was working perfectly before the chrome update. and the exception I am getting is also about the version issue, kindly remove the duplicate tag. – Gkm Jun 07 '19 at 07:22

0 Answers0