-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
mouse_drag
subroutine to support click and drag in tests
1. This PR adds the `mouse_drag` subroutine that enables the mouse and drag support for OpenQA tests. To use the subroutine, it is possible to either provide a "starting" and "ending" needle from which the starting and finishing points will be calculated (using the centres of the needle tag), or coordinates might be provided directly. If both needles and coordinates are provided at the same time, then the coordinates precede over the needles. Combinations are possible, too, which means that one of the points can be passed as a needle and the other as coordinates. 2. In order not to repete code, the part responsible for calculating the center of needle was removed from the `click_lastmatch` subroutine and moved into a standalone non-exported subroutine called `calculate_clickpoint` to be also used by the `mouse_drag` subroutine, as well as by the original `click_lastmatch`. 3. This PR solves action #39335
- Loading branch information
Showing
1 changed file
with
96 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters