Reputation: 23
I tried many things online but I cant find relevant subject in "inspect code" for Quora website. So can someone tell me how can I click this "Copy link" button(Shown in the attached pic) on quora using selenium. PS:You need to be logged into quora to see that button.
Upvotes: 1
Views: 59
Reputation: 1
What you need to do is identify the top level div of that element: eg:
button = driver.find_element_by_id('__w2_wEahGopL52_icon')
button.click()
The parent should be in this order roughly:
svg -parent-> span (with class name : ui_button_icon) -parent-> **div** (use this div)
next is clicking on the copy link button like so:
button = driver.find_element_by_class_name('CopyToClipboardShareLink')
button.click()
Upvotes: 0