Feb-03-2021, 10:37 AM
(This post was last modified: Feb-03-2021, 10:37 AM by straannick.)
(Feb-01-2021, 02:14 PM)snippsat Wrote: If i test recaptcha there is no problem to find theThank you, snippsat. My mistake was that in my example I did not notice iframe, which I wrote about earlier.iframe
and click on check box.
[/url].
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?