Selenium remoteWebDriver&SauceLabs Firefox mosemovoit操作异常

2024-05-23 18:45:54 发布

您现在位置:Python中文网/ 问答频道 /正文

在使用SauceLabs中的任何可用操作系统(除了Linux之外,最新可用的Firefox版本太旧)通过Selenium(3.4.0)和Python绑定(3.4.3)在Firefox上执行一个简单的悬停测试,方法是执行以下ActionChain:

hover = ActionChains(driver)
hover.move_to_element(elm_Men_Menu).perform()

它抛出以下错误:

塔克巴克:

^{pr2}$

在当地它运作得很好。我在使用geckodriver 0.17.0和Selenium 3.4.3(编辑版)。这是一个先前报告的硒错误,但是对于Selenium 3.x和geckodriver 0.15.0(https://github.com/SeleniumHQ/selenium/issues/2285)它得到了解决。对于SauceLabs测试,我使用的是Selenium 3.4.0(可以在错误报告中看到),在SauceLabs文档中,对于firefox53和更高版本,使用geckodriver 0.16.0(https://wiki.saucelabs.com/display/DOCS/Test+Configuration+Options#TestConfigurationOptions-SeleniumVersion),原则上,它应该支持move_to_element()操作。在

我做错什么了吗?有没有办法指定geckodriver版本?到目前为止,所需的功能如下所示:

desired_cap = {
  'platform':"Mac OS X 10.12",
  'browserName':"firefox",
  'version':"54",
  'seleniumVersion':"3.4.0",
}

编辑1:我没有提到它,但它同时支持Chrome和IE11

编辑2:在Linux中使用selenium standalone服务器(3.4.0)在本地执行代码时会出现相同的问题。geckodriver版本是0.17.0。完全相同的回溯,除了System info: host:


Tags: tohttps版本com编辑movelinuxselenium