Closed ahmedabdelhamedz closed 12 months ago
Duplicate of #2026 (comment)
from seleniumbase import Driver
import time
driver = Driver(uc=True)
driver.get("https://nowsecure.nl/#relax")
time.sleep(6)
driver.quit()
i tried this code but give me the same result can you try it on your computer please ?
Works for me. Maybe your ip address is blocked already.
Works for me. Maybe your ip address is blocked already.
i dont think problem from ip becuase it is home resdential ip i tried to put the time.sleep(6) before visit the website it worked successfully
please how can i open link in incognito window and how i close the browser when i use Selenium base becuase i use sb.close() but didnt work for me
i appreciate your support thanks
For the sb
version, use:
from seleniumbase import SB
with SB(uc=True) as sb:
sb.driver.get("https://nowsecure.nl/#relax")
sb.sleep(2)
if not sb.is_text_visible("OH YEAH, you passed!", "h1"):
sb.get_new_driver(undetectable=True)
sb.driver.get("https://nowsecure.nl/#relax")
sb.sleep(2)
if not sb.is_text_visible("OH YEAH, you passed!", "h1"):
if sb.is_element_visible('iframe[src*="challenge"]'):
with sb.frame_switch('iframe[src*="challenge"]'):
sb.click("area")
sb.sleep(2)
sb.activate_demo_mode()
sb.assert_text("OH YEAH, you passed!", "h1", timeout=3)
Use sb.driver
to access the raw driver. The driver will close automatically after the with
block ends.
hello brother why when i open nowsecure.nl with SeleniumBase i t appear cloudflare capatsha ?
nowsecure.nl Checking if the site connection is secure
nowsecure.nl needs to review the security of your connection before proceeding.