.selenide-core.7.4.1.source-code.dblclick.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenide-core Show documentation
Show all versions of selenide-core Show documentation
Selenide = concise API for Selenium WebDriver
(function (element, offsetX, offsetY) {
const rect = element.getBoundingClientRect();
function mouseEvent() {
if (typeof (Event) === 'function') {
return new MouseEvent('dblclick', {
'view': window,
'bubbles': true,
'cancelable': true,
'clientX': rect.left + rect.width / 2 + offsetX,
'clientY': rect.top + rect.height / 2 + offsetY
});
}
else {
const event = document.createEvent('MouseEvent');
event.initEvent('dblclick', true, true);
event.type = 'dblclick'
event.view = window;
event.clientX = rect.left + rect.width / 2 + offsetX
event.clientY = rect.top + rect.height / 2 + offsetY
return event;
}
}
element.dispatchEvent(mouseEvent());
})(arguments[0], arguments[1], arguments[2]);
© 2015 - 2025 Weber Informatics LLC | Privacy Policy