October 22, 2024
Chicago 12, Melborne City, USA
python

Click a button, that shows when you solved the captcha. by Selenium + Python


I need some help. I need to click on "Lưu và tiếp tục" (save and continue) button, but it just appears when I solve the captcha

This is my function to click:
def auto_click(xpath, interval, duration): start_time = time.time() while time.time() - start_time < duration: try: button = WebDriverWait(driver, 10).until( EC.element_to_be_clickable((By.XPATH, xpath)) ) if button.is_displayed() and button.is_enabled(): button.click() return except Exception as e: print(f"error") time.sleep(interval)

This is the element of that button:
<material-button animated="true" class="btn btn-yes _nghost-jzk-8 _ngcontent-jzk-96 highlighted" tabindex="0" role="button" aria-disabled="false" raised="" elevation="1"><div class="content _ngcontent-jzk-8">Lưu và tiếp tục</div><material-ripple aria-hidden="true" class="_ngcontent-jzk-8"><div class="__acx-ripple" style="top: -116px; left: -48.5px; transform: translate(-22.2891px, 6px) scale(0.546686);"></div></material-ripple><div class="touch-target _ngcontent-jzk-8"></div><div class="focus-ring _ngcontent-jzk-8"></div></material-button>



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video