Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要使用鼠标滚轮和触控板来模拟滚动。有什么方法可以在 nightwatch 或 javascript 中执行此操作吗?nightwatch 文档没有提到鼠标滚轮和触控板的任何内容。在这个问题上的任何指导都会有很大帮助:)
利用window.scrollBy(x,y)
window.scrollBy(x,y)
将 x 更改为水平滚动增量,将 y 更改为垂直滚动增量