seleniumbase / SeleniumBase

📊 Python's all-in-one framework for web crawling, scraping, testing, and reporting. Supports pytest. UC Mode provides stealth. Includes many tools.
https://seleniumbase.io
MIT License
4.46k stars 909 forks source link

Update examples to use the newer CF Turnstile selector #2766

Closed mdmintz closed 1 week ago

mdmintz commented 1 month ago

Update examples to use the newer CF Turnstile selector

The Cloudflare Turnstile checkbox selector changed from span.mark to just span. I've already updated the tests for it: https://github.com/seleniumbase/SeleniumBase/commit/e693775f56d0ad2904112577217d934437715125

This is not surprising, considering that they are watching me: https://www.youtube.com/watch?v=2pTpBtaE7SQ&t=1907s

Cloudflare found me

People should be aware that websites can change, which causes CSS Selectors to change too.

Thankfully, no SeleniumBase changes were needed this time, unlike last time: https://github.com/seleniumbase/SeleniumBase/issues/2626

In case there's any confusion, this is all you need to do:

Replace All

...and that should solve the issue!

mdmintz commented 1 week ago

If you need to click a CF CAPTCHA checkbox on Linux now, upgrade to 4.28.0 (or newer) and use driver.uc_gui_handle_cf(). (The solution uses pyautogui)