Unable to get an element via query on attribute(containing hyphens) value using an XPATH
问题 I'm facing a very weird scenario in getting an element having an attribute using an XPATH. The problem is that if the attribute contains more than one Hyphens in it then Selenium is unable to find that element. I am using Python and Selenium 2.52.0 Example that works fine. <span data-one="containingOnlyOneHyphen"> </span> XPATH = '//*[@data-one="containingOnlyOneHyphen"]' (Works Completely Fine) Example that doesn't work. <span data-one-two="containingTwoHyphen"> </span> XPATH = '//*[@data