samedi 14 février 2015

Clicking on given coordinates of element in protractor


I wanna click on a specific location of my canvas element, so I wrote in protractor:



var canvas = element(by.id("canvas"));

var clickCanvas = function (toRight, toBottom) {
browser.actions().mouseMove(canvas, -toRight, -toBottom).click();
}


where toRight/toBottom are the numbers of pixels from the top left corner of my canvas. However, the click does not seem to be executed at the given coordinates. I got this from: http://ift.tt/1KXFF31


Can you confirm it works? Can you suggest alternatives?


Thanks.





Aucun commentaire:

Enregistrer un commentaire