How to scroll to element using Nightwatch?

前端 未结 5 2095
[愿得一人]
[愿得一人] 2021-02-19 02:27

I am using nightwatch for e2etesting my app. One of the tests fails because it cannot scroll to the element that it is testing I suspect. Question do I need to scroll or is ther

5条回答
  •  无人共我
    2021-02-19 03:03

    you can use the moveToElement()

    simply use it like this

    browser.
    .moveToElement(#myElement, 10, 10)
    .waitForElementVisible(#myElement, 500)
    

提交回复
热议问题