|
| 1 | +"""SB Manager using UC Mode for evading bot-detection.""" |
| 2 | +from seleniumbase import SB |
| 3 | + |
| 4 | +with SB(uc=True, test=True, disable_csp=True) as sb: |
| 5 | + url = "https://steamdb.info/" |
| 6 | + sb.driver.uc_open_with_reconnect(url, 3) |
| 7 | + sb.uc_click("a.header-login span", 4) |
| 8 | + if not sb.is_text_visible("Sign in", "button#js-sign-in"): |
| 9 | + sb.driver.uc_open_with_reconnect(url, 3) |
| 10 | + sb.uc_click("a.header-login span", 4) |
| 11 | + sb.assert_text("Sign in", "button#js-sign-in", timeout=3) |
| 12 | + sb.driver.uc_click("button#js-sign-in", 2) |
| 13 | + sb.highlight("div.page_content form") |
| 14 | + sb.highlight('button:contains("Sign in")', scroll=False) |
| 15 | + sb.set_messenger_theme(location="top_center") |
| 16 | + sb.post_message("SeleniumBase wasn't detected", duration=4) |
0 commit comments