【发布时间】:2016-10-05 17:17:08
【问题描述】:
【问题讨论】:
-
定位隐藏元素时是否出现错误?
-
我的意思是在滚动之前隐藏不可见
标签: selenium protractor appium ui-automation appium-ios
【问题讨论】:
标签: selenium protractor appium ui-automation appium-ios
我是这样解决的:
// Create instance of Javascript executor
JavascriptExecutor je = (JavascriptExecutor) driver;
//Identify the WebElement which will appear after scrolling down
WebElement element = driver.findElement(By.tagName("...."));
// now execute query which actually will scroll until that element is not appeared on page.
je.executeScript("arguments[0].scrollIntoView(true);",element);
【讨论】:
试试下面的代码。
browser.executeScript('window.scrollTo(0,0);').then(function () {
page.saveButton.click();
})
希望这会有所帮助。 :)
【讨论】: