10+5.3.21.6+chromeUbuntu I got the following code
`
const centerX = dimensions.width / 2;
const centerY = dimensions.height / 2;
return browser.actions()
.mouseMove(startingPoint, {
x: centerX + x, y: centerY - y
})
.click()
.perform();
`
About 3 months ago this was working just fine. We recently did an update and it seems that the offset is completely ignored alltogether. The offsets are valid numbers. I having a hard time trying to understand where the change is happening but overall this is an issue that is now blocking our testing of a map where we draw squares. Do we know why the offset would be ignored?
On another note I tried to just give it an offset
`
const centerX = dimensions.width / 2;
const centerY = dimensions.height / 2;
return browser.actions()
.mouseMove({
x: centerX + x, y: centerY - y
})
.click()
.perform();
`
The above yields an error WebDriverError: unknown error: at least an element or offset should be set. I am a bit confused as I did pass an offset.
The last thing I will say is that the doc urls on your official sites are broken for alot of things. You can start by looking at the actions page for your API and try clicking anything.
Ok After many hours of trying the answer was to ensure they are int. please update the docs to ensure that people know they cannot use floats.
pbrain19, thanks! I've spent hour trying to figure out what's the problem, it was working and then not working, and then working again, depending on location.
I also faced this issue with coordinates, then find the mistake i was doing:
In chrome.conf.js i was doing w3c: false under chromeOptions:
I removed that property from chrome.conf.js then it start working fine for me.
Most helpful comment
Ok After many hours of trying the answer was to ensure they are int. please update the docs to ensure that people know they cannot use floats.