【发布时间】:2015-06-22 00:53:47
【问题描述】:
内部文件 1,foo.java
bar driver = new bar(getDriver());
driver.click(bar.btn); // this works
driver.test(); // this does not
内部文件 2,bar.java
public bar(WebDriver driver) {
super(driver);
}
public void test(){
click(btn2); // this works too, able to access webdriver
swipe(0.95, 0.5, 0.05, 0.5, 2.0); //errors out
//scrollTo(xpath); // no error but no action
}
“点击”和“滑动”都解析为具有所有经典 webdriver 可用关键字的同一个类文件。如果 click 有效,可以访问 webdriver 类文件,为什么我尝试滑动时会出现错误?
错误:
“尚未实施。”
如果我使用 "scrollTo(xpath);" 而不是“滑动”,我不会收到任何错误,但什么也不会发生。
谢谢
【问题讨论】: