0

Dear Stack Overflowers,

I have a short Python script that automatically goes through the Texas Unemployment Website and fills out all of your information every 2 weeks. This year they started implementing a reCAPTCHA. This steps prevents the script from getting to the next step.

I've tried selecting the captcha by ID and Class but haven't had any luck. The class name changes when you hover over the box as well which makes things more difficult. The first picture below is when I'm not hovered over the box and the second picture is with the mouse over the box. enter image description here enter image description here

I've been using Selenium in Python to find elements on the webpage and make clicks. Here's my last attempt using class name:

driver.find_elements_by_class_name('recaptcha-checkbox goog-inline-block recaptcha-checkbox-unchecked rc-anchor-checkbox').click()

Anybody have any ideas for selecting the reCAPTCHA?

Hiebs915
  • 666
  • 1
  • 7
  • 22
  • 1
    it's probably in an iframe. you need to switch_to the iframe. – DMart Jan 26 '21 at 15:53
  • This isn't in python but you could try using this answer as help: https://stackoverflow.com/questions/55264221/how-to-click-on-the-recaptcha-using-selenium-and-java – Axiumin_ Jan 26 '21 at 15:55
  • @DMart I'm not familiar with switching to iframes. Would I put the class in for "name" like this? iframe = driver.find_element_by_xpath( "//iframe[@name='recaptcha-checkbox goog-inline-block recaptcha-checkbox-unchecked rc-anchor-checkbox']") – Hiebs915 Jan 26 '21 at 16:04
  • See answeres like: https://stackoverflow.com/questions/44834358/switch-to-an-iframe-through-selenium-and-python – DMart Jan 26 '21 at 19:20

0 Answers0