【问题标题】:mouseover/action class methods not workign with selenium3鼠标悬停/动作类方法不适用于 selenium 3
【发布时间】:2017-05-28 02:30:33
【问题描述】:

我正在尝试在 selenium3 的操作类中单击使用 moveToElement 的链接。但它不起作用。 我尝试了动作类中的其他方法(双击、拖放),但似乎都没有工作..

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();

    }

}

硒:3.1 ff:50.1

selenium 3 中的操作类是否存在问题。

我得到的错误是 线程“主”org.openqa.selenium.UnsupportedCommandException 中的异常:POST /session/9988ddc4-ea82-41c2-86d8-3a3815609d0e/moveto 与已知命令不匹配 构建信息:版本:'未知',修订:'1969d75',时间:'2016-10-18 09:43:45 -0700'

【问题讨论】:

    标签: selenium selenium-webdriver selenium3


    【解决方案1】:

    是的,它不起作用,因为在 geckodriver/marionette 中尚未实现 Actions API。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-08
      • 1970-01-01
      • 1970-01-01
      • 2021-12-01
      • 1970-01-01
      • 2017-11-03
      相关资源
      最近更新 更多