jenkins用robojs执行量角器无法处理鼠标

时间:2017-10-31 20:18:04

标签: jenkins protractor

我用jenkins用管道调用量角器

protractor conf.js --suite SetUpTPs

在我调用的代码中获取鼠标位置

browser.sleep(1000).then(() => {
    var robot = require("robotjs");
    robot.setMouseDelay(1000);
    var mouse = robot.getMousePos();
    var screenSize = robot.getScreenSize();
    console.log("getMousePos " + mouse.x + " " + mouse.y);
    robot.moveMouseSmooth(FromXCordinate, FromYCordinate);
    robot.mouseClick("left");
    mouse = robot.getMousePos();
    console.log("getMousePos " + mouse.x + " " + mouse.y);
    robot.mouseToggle('down');
    robot.moveMouseSmooth(xStart, 235 + YCordinate);
    robot.mouseToggle("up");
    mouse = robot.getMousePos();
    console.log("getMousePos " + mouse.x + " " + mouse.y);
});

当我查看jenkins登录时,我得到了

getMousePos -1173274063 32758

如何修复鼠标坐标?

0 个答案:

没有答案