我有这个Python Selenium线程脚本,但如何让它无头运行
def checkout(browser, url):
browser.get(url)
browserThread1 = threading.Thread(target = checkout, args = (webdriver.Chrome(), 'https://www.google.com'))
browserThread2 = threading.Thread(target = checkout, args = (webdriver.Chrome(), 'https://www.google.com'))
browserThread3 = threading.Thread(target = checkout, args = (webdriver.Chrome(), 'https://www.google.com'))
browserThread4 = threading.Thread(target = checkout, args = (webdriver.Chrome(), 'https://www.google.com'))
browserThread1.start()
browserThread2.start()
browserThread3.start()
browserThread4.start()
您可以创建Chrome选项并将其添加到要在headless模式下运行的线程中
相关问题 更多 >
编程相关推荐