Chrome headless 正在抛出 nosuchelements
Chrome headless is throwing nosuchelements
Chrome headless 在 windows 10 上 运行 时为我套件中的所有脚本抛出 nosuchelements 和超时异常,当 运行通过注释将 chrome 选项设置为 headless 的代码片段,脚本是 运行 成功。
此外,脚本 运行 在 Mac os 上成功 chrome。
其他详情
平台:windows10
Chrome版本:74
使用 selenium 和 python
编写的脚本
如果需要任何进一步的详细信息,请告诉我,在此先感谢。
在无头浏览器的情况下,您必须设置 window 大小才能在 event.Because 上触发无头浏览器无法识别没有 window size.Hope 的点击位置work.Give 试试看吧。
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('window-size=1920x1080');
Chrome headless 在 windows 10 上 运行 时为我套件中的所有脚本抛出 nosuchelements 和超时异常,当 运行通过注释将 chrome 选项设置为 headless 的代码片段,脚本是 运行 成功。 此外,脚本 运行 在 Mac os 上成功 chrome。
其他详情 平台:windows10 Chrome版本:74 使用 selenium 和 python
编写的脚本如果需要任何进一步的详细信息,请告诉我,在此先感谢。
在无头浏览器的情况下,您必须设置 window 大小才能在 event.Because 上触发无头浏览器无法识别没有 window size.Hope 的点击位置work.Give 试试看吧。
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('window-size=1920x1080');