What I want to do:
I want to click all the links where partial text = "105611A5C7B9_Logs_"
Example:
First Link Text = 105611A5C7B9_Logs_11-15-18-06-04PM.tgz
Second Link Text = 105611A5C7B9_Logs_11-15-18-11-09PM.tgz
Third Link Text = 105611A5C7B9_Logs_11-15-18-09-18AM.tgz
If I click these links, it will download the files. I want to click all the file links which matches the partial text = "105611A5C7B9_Logs_"
HTML:
<a href="javascript:download('2018-11-15','105611A5C7B9_Logs_11-15-18-06-04PM.tgz','','105611A5C7B9','/2018/11/15/18/')">105611A5C7B9_Logs_11-15-18-06-04PM.tgz</a>
<a href="javascript:download('2018-11-15','105611A5C7B9_Logs_11-15-18-11-09PM.tgz','','105611A5C7B9','/2018/11/15/23/')">105611A5C7B9_Logs_11-15-18-11-09PM.tgz</a>
<a href="javascript:download('2018-11-15','105611A5C7B9_Logs_11-15-18-09-18AM.tgz','','105611A5C7B9','/2018/11/15/9/')">105611A5C7B9_Logs_11-15-18-09-18AM.tgz</a>
What I tried:
link="105611A5C7B9_Logs_"
try:
print(driver.find_element_by_partial_link_text(link).text)
driver.find_element_by_partial_link_text(link).click()
except:
print("Not Found")
This clicks the first link only. How can I click all the links that matches the partial text ?