首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >鼠标悬停/操作类方法不适用于selenium3

鼠标悬停/操作类方法不适用于selenium3
EN

Stack Overflow用户
提问于 2017-01-13 04:29:31
回答 1查看 1K关注 0票数 0

我正在尝试单击selenium3的actions类中使用moveToElement的链接。但是它不起作用..我已经尝试了actions类中的其他方法(doubleclick,draganddrop),但似乎都不起作用。

代码语言:javascript
复制
package Advanced.Actions;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;

public class z_clickEvent {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        String url = "https://www.myhcl.com/Login/home.aspx";
        System.setProperty("webdriver.gecko.driver", "C:\\code\\lib\\browser drivers\\geckodriver.exe");

        WebDriver driver = new FirefoxDriver();
        driver.manage().window().maximize();

        driver.get(url);

        WebElement loginHelp = driver.findElement(By.linkText("Login Help"));

        Actions action = new Actions(driver);
        action.moveToElement(loginHelp).build().perform();
        action.click().build().perform();

    }

}

selenium: 3.1 ff:50.1

selenium 3中的actions类有问题吗?

我收到的错误是线程"main“中的异常org.openqa.selenium.UnsupportedCommandException: POST /session/9988ddc4-ea82-41c2-86d8-3a3815609d0e/moveto与已知命令Build info不匹配:版本:‘未知’,版本:'1969d75',时间:'2016-10-18 09:43:45 -0700‘

EN

回答 1

Stack Overflow用户

发布于 2017-01-13 05:52:56

是的,它不能工作,因为动作API还没有在geckodriver/marionette中实现。

https://github.com/mozilla/geckodriver/issues/233

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41622397

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档