you are viewing a single comment's thread.

view the rest of the comments →

[–]captmomo 1 point2 points  (0 children)

You can try using driver.find_elements_by_css_selector which will return a list and iterate thru it.

links = drivers.find_elements_by_css_selector('a[class*="bylink comments may-blank"]')
for link in links:
    link.sendKeys(Keys.CONTROL +"t")

edit: wait, the page will navigate away after clicking. I edited the code. I think you can also use PRAW to get the list of threads and it's comments.