- The problem:
I'm trying to click this
href
here:
Fail attempts: I tried to use these to no avail
driver.find_element_by_link_text('Join').click() driver.find_element_by_partial_link_text('href').click()
href
here:Fail attempts: I tried to use these to no avail
driver.find_element_by_link_text('Join').click()
driver.find_element_by_partial_link_text('href').click()
To click on the element with text as Join you can use either of the following Locator Strategies:
Using partial_link_text:
Using xpath:
Ideally, to click on the element you need to induce WebDriverWait for the
element_to_be_clickable()
and you can use either of the following Locator Strategies:Using PARTIAL_LINK_TEXT:
Using XPATH:
Note: You have to add the following imports :