codeceptjs / codeceptjs/CodeceptJS

Change WebDriver.IO moveCursorTo behaviour to auto-center on element

未关闭
#2,348 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
webdriver
主要语言
JavaScript
星标
4.2k
派生
757
平均合并
2 天 9 小时
30 天内合并 PR
16

描述

### Issue

WebDriver.IO **moveCursorTo** does not auto-center on element as default

### Issue Details

Current implementation of WebDriver.IO moveCursorTo uses 0,0 as default offsets for x,y coordinates.

In some situations this can cause problems, if hovering actions are implemented on both parent and child element. Having moved the mouse to 0,0 coordinate of the child causes the browser sometimes to trigger hover event of the parent instead of the child at 0,0 coordinate.

### Expected behaviour

Better default behaviour would be to calculate size of the target element and automatically move coursor to the center of this element, instead of the 0,0 corner to improve robustness.

### Environment Details

* CodeceptJS version: 2.4.3
* NodeJS Version: 12.13.0
* Operating System: Windows 10, Chrome 80
* webdriverio

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。