from selenium import webdriver from selenium.webdriver.common.by import By import time for i in range(1000): # Set a delay time.sleep(3) # Configure and start the browser in incognito mode options = webdriver.ChromeOptions() options.add_argument("--incognito") driver = webdriver.Chrome(options=options) # Navigate to the website driver.get("<Your Website URL>") try: # Find the button and click it button = driver.find_element(By.CSS_SELECTOR, "<Your Button CSS Selector>") if button: button.click() print(f"Run {i+1}: Button clicked") else: print(f"Run {i+1}: Button not found") except Exception as e: print(f"Run {i+1}: Error occurred: {e}") finally: # Close the browser window driver.quit()