things_to_check = ['text()', '@class', '@id', '@href']
conditions = ' or '.join(condition % thing for thing in things_to_check)
for elm in driver.find_elements_by_xpath('//*[%s]' % conditions):
    pass
How to find all elements containing the word "download" using Selenium x-path?