Click a href button with selenium and python? Click a href button with selenium and python? selenium selenium

Click a href button with selenium and python?


Using selenium you could use the following code:

driver.find_element_by_link_text("Send InMail").click()


The above answer driver.findElement(By.linkText("Send InMail")).click(); is in Java. In python, use find_element_by_link_text:

driver.find_element_by_link_text('Send InMail').click()

or something like this is sometimes helpful

driver.find_element_by_partial_link_text('Send').click()