centos7 selenium启动chrome失败

有没有人知道centos7 下 selenium+ chrome慢成翔什么原因?

display = Display(visible=0, size=(800, 600))
display.start()
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--user-data-dir")
chromedriver = "/usr/local/bin/chromedriver"
os.environ["webdriver.chrome.driver"] = chromedriver
driver = webdriver.Chrome(executable_path=chromedriver, port=9515, desired_capabilities=chrome_options.to_capabilities(),)
driver.set_page_load_timeout(30)
driver.implicitly_wait(5)
阅读 4.8k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题