@nice-digital/wdio-cucumber-steps
Version:
Shared step definitions for Cucumber JS BDD tests in WebdriverIO
17 lines • 648 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.moveTo = void 0;
/**
* Move to the given element with an optional offset on a X and Y position
* @param {String} selector Element selector
* @param {String} x X coordinate to move to
* @param {String} y Y coordinate to move to
*/
async function moveTo(selector, x, y) {
const xOffset = parseInt(x, 10) || undefined;
const yOffset = parseInt(y, 10) || undefined;
const element = await $(selector);
await element.moveTo({ xOffset, yOffset });
}
exports.moveTo = moveTo;
//# sourceMappingURL=moveTo.js.map