【发布时间】:2018-11-30 15:52:25
【问题描述】:
我使用 Selenium WebDriver 开发了一个应用程序来打开一些页面。它在本地完美运行,但我还需要在客户端启动浏览器。
我在Ubuntu 18 下使用Apache2 部署了应用程序。
driver = webdriver.Chrome(executable_path="chromedriver",chrome_options=chromeOptions)
# Specify the URL.
url = "www.google.com"
driver.get(url)
【问题讨论】:
-
请说得更具体些;你尝试过什么?
-
我编辑了我的帖子
-
当你尝试运行它时会发生什么?有错误吗?脚本是否成功运行并且浏览器窗口永远不会打开?是否安装了 chrome 和/或脚本可以访问 chromedriver EXE?
-
我没有错误,除了 504 网关超时。 chrome 已安装,chromedriver 也在服务器上(我有应用程序的机器)
-
从逻辑上讲,你不需要在客户端安装 chrome 和 chromedriver 才能运行客户端吗?
标签: python selenium selenium-webdriver