{"id":16805113,"url":"https://github.com/mdmintz/undetected-testing","last_synced_at":"2025-07-25T09:37:26.686Z","repository":{"id":119154086,"uuid":"590154022","full_name":"mdmintz/undetected-testing","owner":"mdmintz","description":"Find out if SeleniumBase can bypass CAPTCHAs \u0026 bot-detection services.","archived":false,"fork":false,"pushed_at":"2025-03-07T02:02:42.000Z","size":133,"stargazers_count":33,"open_issues_count":0,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-18T07:11:52.765Z","etag":null,"topics":["cloudflare-bypass","seleniumbase"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdmintz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-17T19:17:16.000Z","updated_at":"2025-03-15T13:41:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"933d3123-192a-428a-88c9-e2bd2684d07c","html_url":"https://github.com/mdmintz/undetected-testing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdmintz%2Fundetected-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdmintz%2Fundetected-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdmintz%2Fundetected-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdmintz%2Fundetected-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdmintz","download_url":"https://codeload.github.com/mdmintz/undetected-testing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244898031,"owners_count":20528331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare-bypass","seleniumbase"],"created_at":"2024-10-13T09:47:09.239Z","updated_at":"2025-03-22T02:31:23.538Z","avatar_url":"https://github.com/mdmintz.png","language":"Python","readme":"# undetected-testing\n\nLearn how [SeleniumBase](https://github.com/seleniumbase/SeleniumBase) can evade detection by sites with anti-bot services.\n\nFirst:\n\n```bash\n\u003e pip install -U seleniumbase\n```\n\nNow you can try running a test ([raw_gitlab.py](https://github.com/mdmintz/undetected-testing/blob/master/raw_gitlab.py)) to see if SeleniumBase can fool the GitLab welcome page, which won't let you through if they detect an automation framework:\n\n```bash\n\u003e python raw_gitlab.py\n\n Success! Website did not detect SeleniumBase!\n\n```\n\nThe code:\n\n```python\nfrom seleniumbase import SB\n\nwith SB(uc=True, test=True, locale_code=\"en\") as sb:\n    url = \"https://gitlab.com/users/sign_in\"\n    sb.activate_cdp_mode(url)\n    sb.uc_gui_click_captcha()\n    sb.assert_text(\"Username\", '[for=\"user_login\"]', timeout=3)\n    sb.assert_element('label[for=\"user_login\"]')\n    sb.highlight('button:contains(\"Sign in\")')\n    sb.highlight('h1:contains(\"GitLab.com\")')\n    sb.post_message(\"SeleniumBase wasn't detected\", duration=4)\n```\n\n--------\n\nHere's a more advanced example, ([raw_bestwestern.py](https://github.com/mdmintz/undetected-testing/blob/master/raw_bestwestern.py))\n\n```python\nfrom seleniumbase import SB\n\nwith SB(uc=True, test=True, locale_code=\"en\") as sb:\n    url = \"https://www.bestwestern.com/en_US.html\"\n    sb.activate_cdp_mode(url)\n    sb.sleep(2.5)\n    sb.cdp.click_if_visible(\"div.onetrust-close-btn-handler\")\n    sb.sleep(1)\n    sb.cdp.click(\"input#destination-input\")\n    sb.sleep(2)\n    location = \"Palm Springs, CA, USA\"\n    sb.cdp.press_keys(\"input#destination-input\", location)\n    sb.sleep(1)\n    sb.cdp.click(\"ul#google-suggestions li\")\n    sb.sleep(1)\n    sb.cdp.click(\"button#btn-modify-stay-update\")\n    sb.sleep(4)\n    sb.cdp.click(\"label#available-label\")\n    sb.sleep(2.5)\n    print(\"Best Western Hotels in %s:\" % location)\n    summary_details = sb.cdp.get_text(\"#summary-details-column\")\n    dates = summary_details.split(\"ROOM\")[0].split(\"DATES\")[-1].strip()\n    print(\"(Dates: %s)\" % dates)\n    flip_cards = sb.cdp.select_all(\".flipCard\")\n    for i, flip_card in enumerate(flip_cards):\n        hotel = flip_card.query_selector(\".hotelName\")\n        price = flip_card.query_selector(\".priceSection\")\n        if hotel and price:\n            print(\"* %s: %s =\u003e %s\" % (\n                i + 1, hotel.text.strip(), price.text.strip())\n            )\n```\n\n--------\n\nSeleniumBase Undetected Mode has been successful in bypassing detection on several sites that use automation-detection services:\n\n\u003cimg width=\"568\" alt=\"Undetected SeleniumBase\" src=\"https://user-images.githubusercontent.com/6788579/213031519-0220d19f-e210-4858-b6b5-9253b112efe4.png\"\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdmintz%2Fundetected-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdmintz%2Fundetected-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdmintz%2Fundetected-testing/lists"}