硒Firefox中的动作

问题描述 投票:0回答:1

我一直在尝试使用硒版本3.5.0在Firefox Quantum版本57+中执行动作操作,并使用geckodriver 0.19.1。但事实是它无法使用操作执行点击操作。

我写的代码是:

WebElement ele = driver.findElement(By.xpath("//div[contains(@title,'" + projName + "')]"));    
new Actions(driver).click(ele).perform();

但是问题是,这行代码没有得到执行,并且没有执行单击操作。这段代码已在chrome最新版本中运行。

任何人都可以在这里帮助我,目前是否还有实现使Firefox的Actions类稳定的实现。

selenium selenium-webdriver firefox selenium-chromedriver geckodriver
1个回答
2
投票

geckodriver不支持Actions类,仅支持W3C WebDriver标准。

根据此github issue,它将在将来的某个时间添加,但是对此没有任何ETA。

© www.soinside.com 2019 - 2024. All rights reserved.