- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在编写一个脚本来使用 Python 中的 Selenium 及其 Chrome 驱动程序在网站上下载一组文件,但我发现每当程序打开新标签页或点击下载时,看到浏览器打开并获得焦点是令人厌恶的按钮。
所以我宁愿使用 headless 模式。但是,该元素总是让我出现以下错误:
WebDriverException: Message: unknown error: Element ... is not clickable at point (435, 575). Other element would receive the click:
...
(Session info: headless chrome=66.0.3359.139) (Driver info: chromedriver=2.37.544337 (8c0344a12e552148c185f7d5117db1f28d6c9e85),platform=Mac OS X 10.13.4 x86_64)
driver.maximize_window()
改变了浏览器的大小,错误消失了。这可以清楚地表明按钮必须在屏幕上可见,才能在 Chrome 上推送。
def login(driver, url, username, password):
driver.get(url)
uname = driver.find_element_by_name("login")
uname.send_keys(username)
passw = driver.find_element_by_name("password")
passw.send_keys(password)
submit_button = driver.find_element_by_class_name("button")
action = webdriver.ActionChains(driver)
action.move_to_element(submit_button)
submit_button.click()
最佳答案
but since I changed the size of the browser by driver.maximize_window()
headless Chrome
时遇到过这个问题。在 Jenkins 。问题是浏览器在 headless 模式下没有以全分辨率打开。所以我添加了一行以使用特定分辨率打开浏览器
driver.set_window_size(1440, 900)
关于python - 即使在 headless 模式下,是否可以在带有 Chrome 的 Selenium 上使用 `element.click()`?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50327432/
我正在尝试使用 firefox headless 在 headless (headless) redhat linux 构建机器上运行 selenium 测试。我创建驱动程序的方法如下所示: priv
关于这个主题有很多东西可以找到,但无法弄清楚。我需要滚动到(不太长)无限滚动页面的末尾。我有 2 个选项可以使用 chrome 非 headless (headless)但似乎不能 headless
我在远程服务器上运行 OpenFOAM,基本上设法通过 paraview 的 pvserver 可视化结果 as described here .然而,在连接后,客户端产生 Server DISPLA
我想在 headless 模式下截取 Android 设备的屏幕截图,也就是说我是这样创建的: echo no | /opt/android/android-sdk-linux/tools/andro
主要区别在于,基于GUI和非GUI(Headless)执行。 我正在寻找所有Headless浏览器之间的差异,但是很遗憾,我没有找到任何差异。我一个接一个地经历,这使我更加困惑。如果有人可以分享具有差
已关闭。这个问题是 off-topic 。目前不接受答案。 想要改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 已关闭10 年前。 Improve th
我需要在没有 X 服务器的情况下执行 java 图像裁剪和调整大小。 我尝试了几种方法。下面的第一种方法有效,但输出了一个相当难看的调整大小的图像(可能使用最近邻算法来调整大小: static Buf
过去几天我一直在使用 Selenium、Tor 和 Firefox 作为多个任务的组合。我已经设法用 Python 编写了一个简单的脚本,它通过 Selenium 控制 Firefox,而 Firef
我正在使用 pygame 的操纵杆 api 在 headless (headless)系统上对我的项目使用操纵杆,但是 pygame 需要一个“屏幕”,所以我设置了一个虚拟视频系统来克服这个问题。它工
我想使用 headless firefox 在 macos 上捕获网页的图像。 这是我执行的命令:/Applications/Firefox.app/Contents/MacOS/firefox-bi
我正在使用带有 headless-chromium-php 的 google chrome headless (headless)浏览器 导航到某些网站,但它总是被验证码检测到 我尝试使用此 plug
是否有可能使用 Octave headless。 像这样的东西 octave result.txt 最佳答案 使用 octave --silent --eval 5+4 > result.txt 你会
我目前正在尝试在 headless (headless)模式下运行应用程序,我定义了后台回调: void callbackInBackground() { // Invoked from the s
我正在使用LibGDX headless backend运行jUnit测试。这在某些测试中效果很好,但是如果我尝试创建new Texture('myTexture.png');,则会收到NullPoi
我想在这个页面上使用 Selenium:https://www.avis.com/en/home 如果没有 headless (headless)模式,该代码一切正常: import requests
在Jasmine headless (headless)Webkit中运行测试时,我遇到了一个简单的TypeError: 'undefined' is not an object失败。但是没有提示在哪
我负责测试一个大量使用 AJAX 的企业 Web 应用程序。我需要构建一个系统,允许在没有人工干预的情况下连续运行测试。目前我最感兴趣的是负载测试,但我希望用于生成负载的相同脚本用于功能测试。 目前用
TL; DR:我可以配置一个容器来原生访问VGA,以覆盖主机视频输出吗? 我正在考虑处置低功耗的XenServer(以前为ESXi)白盒以设置docker最小安装(例如CoreOS,RancherOs
我正在尝试 headless (headless)运行我的测试,并将我的两个测试套件分片以并行运行它们。在我的本地计算机上,它们并行运行,但在这种 headless (headless)设置中,它们一
仍在尝试为大型大学项目(RCP 产品)建立 headless (headless)构建。 每个 Eclipse 用户都知道以下手动功能:“文件 --> 导入 --> 将现有项目导入工作区”以及“构建工
我是一名优秀的程序员,十分优秀!