Python Forum
Parsing html page and working with checkbox (on a captcha)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parsing html page and working with checkbox (on a captcha)
#15
(Feb-01-2021, 02:14 PM)snippsat Wrote: If i test recaptcha there is no problem to find the iframe and click on check box.
[/url].
Thank you, snippsat. My mistake was that in my example I did not notice iframe, which I wrote about earlier.
Since I'm new to Python programming, could you be more specific? Let's see example of your test link (see captcha-1.jpg).
driver = webdriver.Chrome()
driver.get(“https://www.google.com/recaptcha/api2/demo”)
driver.switch_to.frame(0)
print("--- a ---")
elem_capt = driver.find_elements_by_class_name("recaptcha-checkbox-checkmark")
print("--- b ---")
elem_capt.select()
print("--- c ---")
and the result
Output:
--- a --- --- b --- Traceback (most recent call last): File "F:\_документы OI\_my\проекты\Python\goo_login.py", line 74, in <module> main() File "F:\_документы OI\_my\проекты\Python\goo_login.py", line 30, in main elem_capt.select() AttributeError: 'list' object has no attribute 'select' Process finished with exit code 1
So I see the same error as in my main post.
By the way, if I remove "driver.switch_to.frame(0)" I get the same.

So what should I "find" as elem_capt?
Reply


Messages In This Thread
RE: Parsing html page and working with checkbox (on a captcha) - by straannick - Feb-03-2021, 10:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Photo Disable checkbox of google maps markers/labels using selenium erickkill 0 1,315 Nov-25-2021, 12:20 PM
Last Post: erickkill
  <title> django page title dynamic and other field (not working) lemonred 1 2,160 Nov-04-2021, 08:50 PM
Last Post: lemonred
  Automating Captcha form submission with Mechanize Dexty 2 3,398 Aug-03-2021, 01:02 PM
Last Post: Dexty
  HTML multi select HTML listbox with Flask/Python rfeyer 0 4,796 Mar-14-2021, 12:23 PM
Last Post: rfeyer
  Saving html page and reloading into selenium while developing all xpaths Larz60+ 4 4,307 Feb-04-2021, 07:01 AM
Last Post: jonathanwhite1
  API auto-refresh on HTML page using Flask toc 2 12,003 Dec-23-2020, 02:00 PM
Last Post: toc
  Selenium Parsing (unable to Parse page after loading) oneclick 7 6,181 Oct-30-2020, 08:13 PM
Last Post: tomalex
  Help: Beautiful Soup - Parsing HTML table ironfelix717 2 2,781 Oct-01-2020, 02:19 PM
Last Post: snippsat
  [FLASK] checkbox onclick event Mad0ck 2 4,994 May-14-2020, 09:35 AM
Last Post: Mad0ck
  Python3 + BeautifulSoup4 + lxml (HTML -> CSV) - How to loop to next HTML/new CSV Row BrandonKastning 0 2,435 Mar-22-2020, 06:10 AM
Last Post: BrandonKastning

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020