[英]simulate key and trackpad events nightwatch
I need to simulate scrolling using mouse wheel and trackpad. 我需要使用鼠标滚轮和触控板模拟滚动。 Is there any way in which I can do this in nightwatch or javascript?The nightwatch documentation does not have anything mentioned for mousewheel and trackpad.Any guidance in this issue would be of great help :)
我有什么方法可以在守夜人或javascript中做到这一点?守夜人的文档中没有提到鼠标滚轮和触控板的任何内容,对此问题的任何指导都将有很大帮助:)
use window.scrollBy(x,y)
使用
window.scrollBy(x,y)
Change x for horizontal and y for vertical scroll increments 将x更改为水平,将y更改为垂直滚动增量
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.