none
Microsoft Edge (Incorrect XPath behavior for partial @class matches) RRS feed

  • Question

  • Were the below two issues ever fixed and if so, were they fixed in the Edge Driver which corresponds to the Edge Browser version 15063? If not, which version were these fixes applied to? Critical. 

    https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4696709/
    https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8516233/


    • Edited by fractal_c Thursday, July 25, 2019 1:09 PM
    Wednesday, July 24, 2019 3:25 PM

Answers

  • Hi fractal_c,

    I try to visit those 2 links and find that issues are too old and it was with the older version of MS Edge.

    You are also talking about Edge Browser version 15063, which is also too old.

    I made a test with the sample code from those 2 links with Edge 44.

    The sample from link below works fine with MS Edge 44 version.

    Incorrect XPath behavior for partial @class matches

    Sample from link below itself has some error.

    FindElement by xPath does not find elements when contains @class is used for two clases.

    I suggest you to use the latest updates for MS Edge browser and Edge web driver may help you to solve your issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by fractal_c Thursday, July 25, 2019 12:58 PM
    • Unmarked as answer by fractal_c Thursday, July 25, 2019 1:16 PM
    • Marked as answer by fractal_c Thursday, July 25, 2019 2:46 PM
    Thursday, July 25, 2019 5:14 AM
    Moderator

All replies

  • Hi fractal_c,

    I try to visit those 2 links and find that issues are too old and it was with the older version of MS Edge.

    You are also talking about Edge Browser version 15063, which is also too old.

    I made a test with the sample code from those 2 links with Edge 44.

    The sample from link below works fine with MS Edge 44 version.

    Incorrect XPath behavior for partial @class matches

    Sample from link below itself has some error.

    FindElement by xPath does not find elements when contains @class is used for two clases.

    I suggest you to use the latest updates for MS Edge browser and Edge web driver may help you to solve your issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by fractal_c Thursday, July 25, 2019 12:58 PM
    • Unmarked as answer by fractal_c Thursday, July 25, 2019 1:16 PM
    • Marked as answer by fractal_c Thursday, July 25, 2019 2:46 PM
    Thursday, July 25, 2019 5:14 AM
    Moderator
  • Hi Deepak, thanks for the reply. I tried getting the latest version of Edge but Windows updates are company controlled. I wanted to reach out to someone to see if the issue had been resolved and figure out where (which version) it has been resolved in. Thanks so much for the help. Since I know it's been fixed in the later versions, I have justification to request the latest version of Edge. 
    Thursday, July 25, 2019 12:58 PM
  • Hi Deepak,

    Did you check to see if the XPath would successfully retrieve the element you were looking for?

    In the example you tested, you don't actually test to see if it will find if the contains finds what you are looking for. It is correct that the statement,

    var filterRow2 = driver.FindElements(By.XPath("//table//tr[contains(@class,'table-filter')]"));

    will not fail. However, it will return 0 elements. FindElements doesn't ever fail if there are no matches (like FindElement will). FindElements will just returns 0 elements. Have you tried the Xpath on an actual table?

    Thursday, July 25, 2019 1:19 PM