【发布时间】:2014-04-14 16:15:45
【问题描述】:
我正在尝试对从未完成的按钮执行操作。
final Actions action = new Actions(mDriver);
final WebElement myCart = mDriver.findElement(By.cssSelector("path to my span"]"));
final WebElement myButton = mDriver.findElement(By.cssSelector("path to my button"));
action.moveToElement(myCart).build().perform();
action.moveToElement(myButton).click().build().perform();
此代码在 firefox 上完美运行,但在 phantom JS 上无法运行
我在这里How to handle Mouseover in Selenium 2 API 或How to perform mouseover function in Selenium WebDriver using Java? 发现了一些问题,但对幻像没有任何作用。
是否有任何已知的解决方法?
谢谢!
【问题讨论】:
标签: java selenium phantomjs mouseover