【发布时间】:2017-04-18 20:52:41
【问题描述】:
我无法使用 webdriver.io 向下滚动。没有收到任何错误消息,只是没有滚动。我尝试了 Webdrver.io 文档中的不同解决方案:
it('should demonstrate the scroll command', function () {
var elem = $('#myElement');
// scroll to specific element
elem.scroll();
// scroll to specific element with offset
// scroll offset will be added to elements position
elem.scroll(100, 100);
// scroll to specific x and y position
browser.scroll(0, 250);
});
它们都不起作用,有什么建议吗?
【问题讨论】:
-
你可以尝试Actions类的move_to_element(element)来模拟滚动。
标签: selenium selenium-webdriver webdriver-io webautomation