I would like to find links containing: hello, Hello, hEllo, heLlo, etc. So far I use find_elements_by_partial_link_textone that is sensitive to checkout:
find_elements_by_partial_link_text
links = driver.find_elements_by_partial_link_text('hello')
find_elements_by_partial_link_text(), as well as find_elements_by_link_text()case sensitive, and the behavior cannot be easily changed.
find_elements_by_partial_link_text()
find_elements_by_link_text()
Instead, find the links along the xpath and apply the function lower-case():
lower-case()
links = driver.find_elements_by_xpath('//a[contains(lower-case(.), "hello")]')
See also: