0

I can't find how to make my system click my button. here is the code of the button (or in attachment)

<button class="btn btn-primary btn-captcha" id="invisibleCaptchaShortlink" type="submit">continue</button>

enter image description here

I've already tried this command, but it doesn't work.

search = driver.find_element_by_name("invisibleCaptchaShortlink")
search.click()

1 Answer 1

2

Use below xpath ::

driver.find_element_by_xpath("//button[@id='invisibleCaptchaShortlink'][contains(text(),'continue')]")

or

driver.find_element_by_id("invisibleCaptchaShortlink")

You are trying to search element with incorrect strategy use above xpath to locate your element find_element_by_name not valid instead of that you should use find_element_by_id

Sign up to request clarification or add additional context in comments.

1 Comment

@antoinerzad1: Can you please accept the answer if your issue is resolved ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.