I am able to do this
search = "View List"
driver.find_elements_by_xpath("//*/text()[normalize-space(.)='%s']/parent::*" % search)
but I need it to ignore and match all elements with text like: "VieW LiSt" or "view LIST"
search = "View List"
driver.find_elements_by_xpath("//*/lower-case(text())[normalize-space(.)='%s']/parent::*" % search.lower())
The above doesn't seem to work. lower-case()
is in XPATH 1.0