Closed edoardocavazza closed 7 years ago
moveToElement is not an alias, it takes a selector as first argument while moveTo takes a selenium/webdriver web element - https://www.w3.org/TR/webdriver/#elements.
It's what is written in the documentation here: http://nightwatchjs.org/api/moveToElement.html. BTW, the point is that in http://nightwatchjs.org/api/moveTo.html the xoffset
and yoffset
params have this behavior:
If not specified, the mouse will move to the middle of the element.
while in the moveToElement
they are required. I just thought that this discrepancy could be a bug because it prevents to point the middle of an element using a selector.
I have workarounded this for the moment using .moveToElement(<sel>, undefined, undefined)
I see. Yeah, that's true. Feel free to re-open this if you believe it should be fixed, but please add more details because as it is it's not very clear. See the contributing guidelines.
The
moveToElement
alias tomoveTo
requires 2 arguments (offsetX and offsetY) that are not required by the original method.