codeceptjs / codeceptjs/CodeceptJS

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

Đang mở
#2,348 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
webdriver
Ngôn ngữ chính
JavaScript
Star
4.2k
Fork
757
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
16

Mô tả

### 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.