CN109871172A - Mouse click method, device and readable storage medium storing program for executing in a kind of automatic test - Google Patents
Mouse click method, device and readable storage medium storing program for executing in a kind of automatic test Download PDFInfo
- Publication number
- CN109871172A CN109871172A CN201910064281.XA CN201910064281A CN109871172A CN 109871172 A CN109871172 A CN 109871172A CN 201910064281 A CN201910064281 A CN 201910064281A CN 109871172 A CN109871172 A CN 109871172A
- Authority
- CN
- China
- Prior art keywords
- click
- window
- desktop
- percentage
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The invention discloses mouse click method, device and the readable storage medium storing program for executing in a kind of automatic test, comprising: in response to the instruction that mouse is clicked, obtains click location data;Wherein, current position data of clicking includes the position and its percentage of first window click location and its position percentage, the first desktop click location and its position percentage, first window in desktop, and presetting and clicking position data includes the position and its percentage of the second window click location and its position percentage, the second desktop click location and its position percentage, the second window in desktop;When authenticating to current click position data and default click position data is inconsistent, default click position data is calculated according to current position data of clicking, obtain actual click position data, and clicking operation is executed according to actual click position data, mouse invalid clicks, mistake click the appearance of event when can effectively reduce automatic test playback.
Description
Technical field
The present invention relates in automatization testing technique field more particularly to a kind of automatic test mouse click method,
Device and readable storage medium storing program for executing.
Background technique
With the increase of the scale and complexity of software systems, effect of the software test in software development is also increasingly heavier
It wants, strengthens and simplify the raising that software test is more conducive to software quality.In general, devising test case and passing through evaluation
Afterwards, test is executed as tester's regulation according to described in test case step by step, obtains actual result and expected result
Compare.In the process, in order to save manpower, time or hardware resource, testing efficiency is improved, automatic test is just introduced
Concept;The behavioral test taking human as driving is converted into a kind of process of machine execution.Software test automation is surveyed in software
The status of examination is more and more important, automatic test be reduce testing cost it is important by way of one of, while the degree of automation, survey
Trying coverage rate, testing cost etc. all has advantage.
The click location of existing several relevant automated test tools or mouse automatically clicking tool, mouse determines
It is single object of reference (based on desktop), all when size of desktop changes or pop-up window position changes, system
It just will appear the situations such as invalid clicks, mistake click when the script performed is played back.
Summary of the invention
The embodiment of the present invention provides mouse click method, device and the readable storage medium storing program for executing in a kind of automatic test, energy
Mouse invalid clicks, mistake click the appearance of event when effectively reducing automatic test script playback, can effectively improve automation
The efficiency of test.
One embodiment of the invention provides the mouse click method in a kind of automatic test, comprising:
In response to the instruction that mouse is clicked, click location data are obtained;Wherein, the click location data include current point
Position data and default click position data are hit, the current click position data includes first window click location and its position
The position and its percentage of percentage, the first desktop click location and its position percentage, the first window in the desktop,
The default click position data includes the second window click location and its position percentage, the second desktop click location and its position
Set the position and its percentage of percentage, the second window in the desktop;
When authenticating to the current click position data and the default click position data is inconsistent, worked as according to described
Preceding click location data calculate the default click position data, obtain actual click position data, and according to described
Actual click position data executes clicking operation.
As an improvement of the above scheme, the method also includes obtaining the click location data as follows:
Using the top left corner apex of desktop as origin, rectangular coordinate system is established in the desktop, obtains desktop coordinate model;
The window data obtained in advance, desktop data are input to the desktop coordinate model, the desktop is obtained and clicks
The corresponding coordinate in position, the window are in the corresponding coordinate in the position of the desktop;Wherein, the window data includes the window
The width of mouth is high and window click location, the desktop data include the width height of the desktop, desktop click location;
According to the corresponding coordinate of the desktop click location, the window in the corresponding coordinate in the position of the desktop, meter
Calculate the percentage of the position of the position percentage, the window of the desktop click location in the desktop.
As an improvement of the above scheme, the method also includes obtaining the click location data as follows:
According to the window click location, using the top left corner apex of the window as origin, established in the window straight
Angular coordinate system obtains window coordinates model, and determines the corresponding seat of the window click location according to the window coordinates model
Mark;
According to the corresponding coordinate of the window click location, the position percentage of the window click location is calculated.
As an improvement of the above scheme, the method also includes verifying the current click position data as follows
It is whether consistent with default click position data:
Judge the position percentage of the first window click location, the position percentage of the first desktop click location
And the percentage of position of first window in the desktop and the second window click location position percentage,
The percentage of the position percentage of the second desktop click location when position of described second window in the desktop is
It is no consistent;If so, executing clicking operation according to the first window click location;If it is not, according to the current click location
Data calculate the default click position data, obtain actual click position data, and according to the actual click position
It sets data and executes clicking operation.
As an improvement of the above scheme, described according to the current click position data, to the default click positional number
According to being calculated, actual click position data is obtained, and clicking operation is executed according to the actual click position data, it is specific to wrap
It includes:
According to the position percentage of the first desktop click location, first window in the position of the desktop
Percentage, using the desktop coordinate model to the corresponding coordinate of the second desktop click location, second window
Mouth is converted in proportion in the corresponding coordinate in the position of the desktop, obtains the corresponding coordinate of practical desktop click location.
As an improvement of the above scheme, described according to the current click position data, to the default click positional number
According to being calculated, actual click position data is obtained, and clicking operation is executed according to the actual click position data, it is specific to go back
Include:
According to the described first window in the percentage of the position of the desktop, the position of the first window click location
Percentage is set, is converted in proportion using the window coordinates model to the corresponding coordinate of the second window click location,
Obtain coordinate corresponding in actual window click location;
According to it is described in the corresponding coordinate of the practical desktop click location, the corresponding seat of the practical desktop click location
Mark obtains actual click position data, and executes clicking operation according to the actual click position data.
Another embodiment of the present invention is corresponding to provide a kind of mouse pointing devices in automatic test, comprising:
Data acquisition module, the instruction for clicking in response to mouse obtain click location data;Wherein, the click
Position data includes currently clicking position data and presetting to click position data, and the current click position data includes the first window
Mouth click location and its position percentage, the first desktop click location and its position percentage, the first window are in the table
The position in face and its percentage, the default click position data include the second window click location and its position percentage, the
The position and its percentage of two desktop click locations and its position percentage, the second window in the desktop;
Module is clicked, for authenticating to the current click position data and the default click position data is inconsistent
When, according to the current click position data, the default click position data is calculated, actual click positional number is obtained
According to, and clicking operation is executed according to the actual click position data.
Compared with prior art, the mouse click method and dress in a kind of automatic test disclosed by the embodiments of the present invention
It sets, by the instruction clicked in response to mouse, obtains click location data;Wherein, the click location data include current point
Position data and default click position data are hit, the current click position data includes first window click location and its position
The position and its percentage of percentage, the first desktop click location and its position percentage, the first window in the desktop,
The default click position data includes the second window click location and its position percentage, the second desktop click location and its position
Set the position and its percentage of percentage, the second window in the desktop;Authenticating to the current click position data
When inconsistent with the default click position data, according to the current click position data, to the default click positional number
According to being calculated, actual click position data is obtained, and clicking operation is executed according to the actual click position data, it can be effective
Mouse invalid clicks, mistake click the appearance of event when reducing automatic test script playback, and guarantee mouse click event has
Effect property, so as to effectively improve the rate that performs effectively of playback script, improves the efficiency and quality of automatic test.
Another embodiment of the present invention provides the mouse pointing devices in a kind of automatic test, including processor, storage
Device and storage in the memory and are configured as the computer program executed by the processor, and the processor executes
The mouse click method in automatic test described in foregoing invention embodiment is realized when the computer program.
Another embodiment of the present invention provides a kind of storage medium, the computer readable storage medium includes the meter of storage
Calculation machine program, wherein control equipment where the computer readable storage medium in computer program operation and execute
State the mouse click method in automatic test described in inventive embodiments.
Detailed description of the invention
Fig. 1 is the flow diagram of the mouse click method in a kind of automatic test that one embodiment of the invention provides;
Fig. 2 is the structural schematic diagram of the mouse pointing devices in a kind of automatic test that one embodiment of the invention provides.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
It is that the process of the mouse click method in a kind of automatic test of one embodiment of the invention offer is shown referring to Fig. 1
It is intended to, comprising:
S11, the instruction clicked in response to mouse, obtain click location data;Wherein, the click location data include working as
Preceding click location data and it is default click position data, the current click position data include first window click location and its
Position percentage, the first desktop click location and its position percentage, the first window are in the position of the desktop and its hundred
Divide ratio, the default click position data includes the second window click location and its position percentage, the second desktop click location
And its position and its percentage of position percentage, the second window in the desktop.
Wherein, the click location data using desktop as referential are obtained as follows:
Using the top left corner apex of desktop as origin, rectangular coordinate system is established in the desktop, obtains desktop coordinate model;
The window data obtained in advance, desktop data are input to the desktop coordinate model, the desktop is obtained and clicks
The corresponding coordinate in position, the window are in the corresponding coordinate in the position of the desktop;Wherein, the window data includes the window
The width of mouth is high and window click location, the desktop data include the width height of the desktop, desktop click location;
According to the corresponding coordinate of the desktop click location, the window in the corresponding coordinate in the position of the desktop, meter
Calculate the percentage of the position of the position percentage, the window of the desktop click location in the desktop.
The click location data using window as referential are obtained as follows:
According to the window click location, using the top left corner apex of the window as origin, established in the window straight
Angular coordinate system obtains window coordinates model, and determines the corresponding seat of the window click location according to the window coordinates model
Mark;
According to the corresponding coordinate of the window click location, the position percentage of the window click location is calculated.
It is appreciated that using the upper left corner of desktop as origin, in desktop laterally to the right be on one side X-axis positive direction, in desktop
Vertically downwards establish rectangular coordinate system on one side for Y-axis positive direction, obtain the desktop coordinate model using desktop as referential.By window
Mouth title, wide high, desktop click location and the wide height of desktop are input to the desktop coordinate model and carry out coordinate setting, obtain desktop
The corresponding coordinate of click location, the window top left corner apex in the corresponding coordinate in the position of the desktop.It is obtained afterwards to above-mentioned
The corresponding coordinate of desktop click location that arrives, the window carry out percentage calculating in the corresponding coordinate in the position of the desktop,
Obtain the position percentage of desktop click location, the window the position of the desktop percentage.In addition, with a left side for window
Upper angle is origin, in window laterally to the right be on one side X-axis positive direction, being built on one side for Y-axis positive direction vertically downwards in window
Vertical rectangular coordinate system, obtains the window coordinates model using window as referential.Window click location is input to the window to sit
Mark model carry out coordinate setting, obtain the corresponding coordinate of window click location, after to the corresponding coordinate of the window click location
Percentage calculating is carried out, the position percentage of window click location is obtained.Wherein, the window in the position of the desktop hundred
Divide than the abscissa by window top left corner apex divided by the ordinate of desktop width and window top left corner apex divided by the high of desktop
Degree composition, percentage of the window in the position of the desktop may include the wide high and wide high percentage of desktop of the window
Than the percentage of the absolute distance of the top left corner apex of the top left corner apex and desktop of window.
Further, in replayed section, by the wide height of the window currently got, title, desktop wide high, the first table
Face click location inputs the desktop coordinate model and carries out coordinate setting, obtains the corresponding coordinate of the first desktop click location, the
The position percentage of one desktop click location, the first window are in the corresponding coordinate in the position of the desktop, the first window
Percentage of the mouth in the position of the desktop.The first window click location currently got is input to the window coordinates mould
Type carries out coordinate setting, obtains the position percentage of the corresponding coordinate of first window click location, first window click location.Root
According to the corresponding data of the name acquiring recording and storing of current window.Preferably, in recording process, by the corresponding window
Wide high, desktop wide high, the second desktop click location inputs the desktop coordinate model and carries out coordinate setting, obtains the second desktop
The corresponding coordinate of click location, the position percentage of the second desktop click location, the second window are in the position of the desktop
Corresponding coordinate, the second window the position of the desktop percentage.Second window click location is input to described
Window coordinates model carries out coordinate setting, obtains the position of the corresponding coordinate of the second window click location, the second window click location
Set percentage.
S12, when authenticating to the current click position data and the default click position data is inconsistent, according to institute
State it is current click position data, the default click position data is calculated, obtains actual click position data, and according to
The actual click position data executes clicking operation.
Preferably, verify as follows the current click position data and it is default click position data whether one
It causes:
Judge the position percentage of the first window click location, the position percentage of the first desktop click location
And the percentage of position of first window in the desktop and the second window click location position percentage,
The percentage of the position percentage of the second desktop click location when position of described second window in the desktop is
It is no consistent;If so, executing clicking operation according to the first window click location;If it is not, according to the current click location
Data calculate the default click position data, obtain actual click position data, and according to the actual click position
It sets data and executes clicking operation.
It should be noted that in script replayed section, when encountering mouse click event, first verify current point hit position with
Whether the absolute position percentage of default click location consistent with relative position percentage, wherein absolute position percentage be with
Desktop be referential desktop click location position percentage and the window the position of the desktop percentage, relatively
Position percentage is using window as the position percentage of the window click location of referential.
In an alternative embodiment, when the absolute position percentage and phase of current click location and default click location
When consistent to position percentage, clicking operation is executed according to current first window click location.
In an alternative embodiment, when the absolute position percentage and phase of current click location and default click location
When inconsistent to position percentage, according to the current click position data, the default click position data is calculated,
Actual click position data is obtained, and clicking operation is executed according to the actual click position data.For example, working as recording process
In, the coordinate record of click location is based only upon single referential, such as desktop or window, may cause desktop in replayed section
The case where wide High variation, pop-up window change in location, actual click position need to be redefined.
Further, the actual click position of desktop is determined using desktop as referential:
According to the position percentage of the first desktop click location, first window in the position of the desktop
Percentage, using the desktop coordinate model to the corresponding coordinate of the second desktop click location, second window
Mouth is converted in proportion in the corresponding coordinate in the position of the desktop, obtains the corresponding coordinate of practical desktop click location.
Further, the actual click position of window is determined using window as referential:
According to the described first window in the percentage of the position of the desktop, the position of the first window click location
Percentage is set, is converted in proportion using the window coordinates model to the corresponding coordinate of the second window click location,
Obtain coordinate corresponding in actual window click location.
According to it is described in the corresponding coordinate of the practical desktop click location, the corresponding seat of the practical desktop click location
Mark obtains actual click position data, and executes clicking operation according to the actual click position data.
Wherein, as proof, by taking the position of the top left corner apex of window as an example, when recording, and a height of 16:8 of desktop width, window
The a height of 8:4 of mouth width, the top left corner apex of window are (2,1) in the coordinate of desktop, then percentage of the window in the position of desktop is
(1/8,1/8).When playback, a height of 8:4 of desktop width, a height of 4:2 of window width, percentage of the window in the position of desktop should still be
(1/8,1/8), then by converting in proportion, the top left corner apex of window should be (1,0.5) in the coordinate of desktop.
Mouse click method in a kind of automatic test provided in an embodiment of the present invention, passes through what is clicked in response to mouse
Instruction obtains click location data;Wherein, the click location data include that current point hits position data and default click location
Data, the current click position data include first window click location and its position percentage, the first desktop click location
And its position and its percentage of position percentage, the first window in the desktop, the default click position data packet
Include the second window click location and its position percentage, the second desktop click location and its position percentage, the second window
Position and its percentage in the desktop;Authenticating to the current click position data and the default click position data
When inconsistent, according to the current click position data, the default click position data calculated, actual click is obtained
Position data, and clicking operation is executed according to the actual click position data, automatic test script playback can be effectively reduced
When mouse invalid clicks, mistake click the appearance of event, guarantee the validity of mouse click event, so as to effectively improve playback
Script performs effectively rate, improves the efficiency and quality of automatic test.
It referring to fig. 2, is that the structure of mouse pointing devices in a kind of automatic test that one embodiment of the invention provides is shown
It is intended to, comprising:
Data acquisition module 1, the instruction for clicking in response to mouse obtain click location data;Wherein, the click
Position data includes currently clicking position data and presetting to click position data, and the current click position data includes the first window
Mouth click location and its position percentage, the first desktop click location and its position percentage, the first window are in the table
The position in face and its percentage, the default click position data include the second window click location and its position percentage, the
The position and its percentage of two desktop click locations and its position percentage, the second window in the desktop;
Module 2 is clicked, for authenticating to the current click position data and the default click position data is different
When cause, according to the current click position data, the default click position data is calculated, actual click position is obtained
Data, and clicking operation is executed according to the actual click position data.
Preferably, include: in the data acquisition module 1
Desktop coordinate model construction unit, for being established in the desktop straight using the top left corner apex of desktop as origin
Angular coordinate system obtains desktop coordinate model;
Desktop coordinate unit, for the window data obtained in advance, desktop data to be input to the desktop coordinate model,
The corresponding coordinate of the desktop click location, the window are obtained in the corresponding coordinate in the position of the desktop;Wherein, the window
Mouth data include that the width of the window is high and window click location, the desktop data include width height, the desktop point of the desktop
Hit position;
Desktop percentage computing unit is used for according to the corresponding coordinate of the desktop click location, the window described
The corresponding coordinate in the position of desktop, the position percentage for calculating the desktop click location, the window are in the position of the desktop
The percentage set;
Window coordinates model construction unit is used for according to the window click location, with the top left corner apex of the window
For origin, rectangular coordinate system is established in the window, obtains window coordinates model, and determine according to the window coordinates model
The corresponding coordinate of the window click location;
Window percentage computing unit, for calculating the window point according to the corresponding coordinate of the window click location
Hit the position percentage of position.
Preferably, which includes:
Judging unit, for judging that the position percentage of the first window click location, first desktop click position
When percentage of described first window in the position of the desktop clicks position with second window to the position percentage set
The position percentage of the position percentage, the second desktop click location set when the described second window in the desktop
Whether the percentage of position is consistent;If so, executing clicking operation according to the first window click location;If it is not, according to institute
State it is current click position data, the default click position data is calculated, obtains actual click position data, and according to
The actual click position data executes clicking operation.
Preferably, the click module 2 further include:
Practical desktop click location computing unit, for the position percentage according to the first desktop click location, institute
The first window is stated in the percentage of the position of the desktop, second desktop is clicked using the desktop coordinate model
The corresponding coordinate in position, second window are converted in proportion in the corresponding coordinate in the position of the desktop, are obtained
The corresponding coordinate of practical desktop click location;
Actual window click location computing unit, for according to the described first window the hundred of the position of the desktop
Point than, the first window click location position percentage, second window is clicked using the window coordinates model
The corresponding coordinate in position is converted in proportion, obtains coordinate corresponding in actual window click location;
Click unit, for according to described in the corresponding coordinate of the practical desktop click location, the practical desktop point
The corresponding coordinate in position is hit, obtains actual click position data, and clicking operation is executed according to the actual click position data.
It referring to fig. 2, is that the structure of mouse pointing devices in a kind of automatic test that one embodiment of the invention provides is shown
It is intended to, comprising: processor, memory and storage are in the memory and the computer journey that can run on the processor
Sequence.The processor realizes the mouse click method embodiment in above-mentioned each automatic test when executing the computer program
In step, such as step S12 shown in FIG. 1 authenticating to the current click position data and the default click positional number
According to it is inconsistent when, according to the current click position data, the default click position data is calculated, actual point is obtained
Position data is hit, and clicking operation is executed according to the actual click position data.Alternatively, the processor executes the calculating
The function of each module/unit in above-mentioned each Installation practice is realized when machine program, such as clicks module 2, for authenticating to
It is right according to the current click position data when stating current click position data and the inconsistent default click position data
The default click position data is calculated, and obtains actual click position data, and according to the actual click position data
Execute clicking operation.
Illustratively, the computer program can be divided into one or more module/units, one or more
A module/unit is stored in the memory, and is executed by the processor, to complete the present invention.It is one or more
A module/unit can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing institute
State implementation procedure of the computer program in the mouse pointing devices in the automatic test.For example, the computer program
Data acquisition module 1 can be divided into and click module 2.
Mouse pointing devices in the automatic test can be desktop PC, notebook, palm PC and cloud
Server etc. is held to calculate equipment.Mouse pointing devices in the automatic test may include, but be not limited only to, and processor is deposited
Reservoir.It will be understood by those skilled in the art that the schematic diagram is only the example of the mouse pointing devices in automatic test,
The restriction to the mouse pointing devices in automatic test is not constituted, may include components more more or fewer than diagram, or
The mouse pointing devices that person combines in certain components or different components, such as the automatic test can also include defeated
Enter output equipment, network access equipment, bus etc..
Alleged processor can be central processing unit (Central Processing Unit, CPU), can also be it
His general processor, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng the processor is the control centre of the mouse pointing devices in the automatic test, and various interfaces and route is utilized to connect
Connect the various pieces of the mouse pointing devices in entire automatic test.
The memory can be used for storing the computer program and/or module, and the processor is by operation or executes
Computer program in the memory and/or module are stored, and calls the data being stored in memory, described in realization
The various functions of mouse pointing devices in automatic test.The memory can mainly include storing program area and storing data
Area, wherein storing program area can application program needed for storage program area, at least one function (such as sound-playing function,
Image player function etc.) etc.;Storage data area, which can be stored, uses created data (such as audio data, electricity according to mobile phone
Script for story-telling etc.) etc..In addition, memory may include high-speed random access memory, it can also include nonvolatile memory, such as
Hard disk, memory, plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure
Digital, SD) card, flash card (Flash Card), at least one disk memory, flush memory device or other volatibility are solid
State memory device.
Wherein, if the integrated module/unit of mouse pointing devices in the automatic test is with SFU software functional unit
Form realize and when sold or used as an independent product, can store in a computer readable storage medium.
Based on this understanding, the present invention realizes all or part of the process in above-described embodiment method, can also pass through computer journey
Sequence is completed to instruct relevant hardware, and the computer program can be stored in a computer readable storage medium, the meter
Calculation machine program is when being executed by processor, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the computer program packet
Include computer program code, the computer program code can for source code form, object identification code form, executable file or
Certain intermediate forms etc..The computer-readable medium may include: any reality that can carry the computer program code
Body or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-
Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and
Software distribution medium etc..It should be noted that the content that the computer-readable medium includes can be according in jurisdiction
Legislation and the requirement of patent practice carry out increase and decrease appropriate, such as in certain jurisdictions, according to legislation and patent practice, meter
Calculation machine readable medium does not include electric carrier signal and telecommunication signal.
It should be noted that the apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
It needs that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.In addition, device provided by the invention
In embodiment attached drawing, the connection relationship between module indicate between them have communication connection, specifically can be implemented as one or
A plurality of communication bus or signal wire.Those of ordinary skill in the art are without creative efforts, it can understand
And implement.
The above is a preferred embodiment of the present invention, it is noted that for those skilled in the art
For, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also considered as
Protection scope of the present invention.
Claims (9)
1. the mouse click method in a kind of automatic test characterized by comprising
In response to the instruction that mouse is clicked, click location data are obtained;Wherein, the click location data include that current point hits position
Data and default click position data are set, the current click position data includes first window click location and its position percentage
It is described than, the position and its percentage of the first desktop click location and its position percentage, the first window in the desktop
Default position data of clicking includes the second window click location and its position percentage, the second desktop click location and its position hundred
Point than, position and its percentage of second window in the desktop;
When authenticating to the current click position data and the default click position data is inconsistent, according to the current point
Position data is hit, the default click position data is calculated, obtains actual click position data, and according to the reality
Click location data execute clicking operation.
2. the mouse click method in automatic test as described in claim 1, which is characterized in that the method also includes logical
It crosses following steps and obtains the click location data:
Using the top left corner apex of desktop as origin, rectangular coordinate system is established in the desktop, obtains desktop coordinate model;
The window data obtained in advance, desktop data are input to the desktop coordinate model, obtain the desktop click location
Corresponding coordinate, the window are in the corresponding coordinate in the position of the desktop;Wherein, the window data includes the window
Wide high and window click location, the desktop data include the width height of the desktop, desktop click location;
According to the corresponding coordinate of the desktop click location, the window in the corresponding coordinate in the position of the desktop, institute is calculated
State the position percentage of desktop click location, the window the position of the desktop percentage.
3. the mouse click method in automatic test as claimed in claim 2, which is characterized in that the method also includes logical
It crosses following steps and obtains the click location data:
According to the window click location, using the top left corner apex of the window as origin, right angle seat is established in the window
Mark system, obtains window coordinates model, and determine the corresponding coordinate of the window click location according to the window coordinates model;
According to the corresponding coordinate of the window click location, the position percentage of the window click location is calculated.
4. the mouse click method in automatic test as claimed in claim 3, which is characterized in that the method also includes logical
It crosses the following steps verifying current click position data and whether default click position data is consistent:
The position percentage of the position percentage, the first desktop click location that judge the first window click location when institute
The first window is stated in the position percentage, described of percentage and the second window click location of the position of the desktop
The position percentage of second desktop click location when the described second window the position of the desktop percentage whether one
It causes;If so, executing clicking operation according to the first window click location;If it is not, according to the current click position data,
The default click position data is calculated, obtains actual click position data, and according to the actual click positional number
According to execution clicking operation.
5. the mouse click method in automatic test as claimed in claim 3, which is characterized in that described according to described current
Click location data calculate the default click position data, obtain actual click position data, and according to the reality
Border click location data execute clicking operation, specifically include:
According to the position percentage of the first desktop click location, first window the hundred of the position of the desktop
Divide ratio, is existed using the desktop coordinate model to the corresponding coordinate of the second desktop click location, second window
The corresponding coordinate in the position of the desktop is converted in proportion, obtains the corresponding coordinate of practical desktop click location.
6. the mouse click method in automatic test as claimed in claim 5, which is characterized in that described according to described current
Click location data calculate the default click position data, obtain actual click position data, and according to the reality
Border click location data execute clicking operation, specifically further include:
According to the described first window in the percentage of the position of the desktop, the position hundred of the first window click location
Divide ratio, is converted, obtained in proportion to the corresponding coordinate of the second window click location using the window coordinates model
In the corresponding coordinate of actual window click location;
According to it is described in the corresponding coordinate of the practical desktop click location, the corresponding coordinate of the practical desktop click location,
Actual click position data is obtained, and clicking operation is executed according to the actual click position data.
7. the mouse pointing devices in a kind of automatic test characterized by comprising
Data acquisition module, the instruction for clicking in response to mouse obtain click location data;Wherein, the click location
Data include that current point hits position data and default click position data, and the current click position data includes first window point
Position and its position percentage, the first desktop click location and its position percentage, the first window are hit in the desktop
Position and its percentage, the default click position data include the second window click location and its position percentage, the second table
The position and its percentage of face click location and its position percentage, the second window in the desktop;
Module is clicked, for when authenticating to current the clicks position data and the default click position data is inconsistent,
According to the current click position data, the default click position data is calculated, actual click position data is obtained,
And clicking operation is executed according to the actual click position data.
8. the mouse pointing devices in a kind of automatic test, including processor, memory and storage are in the memory
And it is configured as the computer program executed by the processor, the processor is realized when executing the computer program as weighed
Benefit require any one of 1 to 6 described in mouse click method in automatic test.
9. a kind of computer readable storage medium, which is characterized in that the computer readable storage medium includes the calculating of storage
Machine program, wherein equipment where controlling the computer readable storage medium in computer program operation is executed as weighed
Benefit require any one of 1 to 6 described in mouse click method in automatic test.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910064281.XA CN109871172B (en) | 2019-01-23 | 2019-01-23 | Mouse clicking method and device in automatic test and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910064281.XA CN109871172B (en) | 2019-01-23 | 2019-01-23 | Mouse clicking method and device in automatic test and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109871172A true CN109871172A (en) | 2019-06-11 |
CN109871172B CN109871172B (en) | 2020-09-15 |
Family
ID=66917875
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910064281.XA Active CN109871172B (en) | 2019-01-23 | 2019-01-23 | Mouse clicking method and device in automatic test and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109871172B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113391752A (en) * | 2021-06-21 | 2021-09-14 | 昆明理工大学 | Interaction technology of mouse-based touch interactive equipment |
CN113555131A (en) * | 2021-05-20 | 2021-10-26 | 浙江警察学院 | Psychophysical testing method, apparatus and medium for rewarding motivation of drug addict |
Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101242621A (en) * | 2008-01-21 | 2008-08-13 | 中兴通讯股份有限公司 | An automatic testing method and system based on interface |
CN103543923A (en) * | 2013-07-23 | 2014-01-29 | Tcl集团股份有限公司 | Control clicking event processing method and system |
CN103678106A (en) * | 2012-09-19 | 2014-03-26 | 腾讯科技(深圳)有限公司 | Method and device for content recording |
US20140089904A1 (en) * | 2012-09-26 | 2014-03-27 | Compuware Corporation | Technique for simulating an orientation change event in a test environment |
CN104849576A (en) * | 2014-02-13 | 2015-08-19 | 广东小天才科技有限公司 | Automatic test system and test method |
CN105022687A (en) * | 2014-04-22 | 2015-11-04 | 腾讯科技(深圳)有限公司 | Implementation method and device of sliding operation in automated testing scheme |
CN105138316A (en) * | 2015-07-23 | 2015-12-09 | 中山大学深圳研究院 | Automatic clicking method and device based on super sketchpad |
CN105138463A (en) * | 2015-09-25 | 2015-12-09 | 成都中科创达软件有限公司 | Testing method and system for mobile terminal software |
CN105183599A (en) * | 2015-09-08 | 2015-12-23 | 上海斐讯数据通信技术有限公司 | Script recording system and method |
CN105740153A (en) * | 2016-02-29 | 2016-07-06 | 网易(杭州)网络有限公司 | Cloud testing method and device |
CN105740874A (en) * | 2016-03-04 | 2016-07-06 | 网易(杭州)网络有限公司 | Method and device for determining operation coordinate of automation test script during playback |
CN105866574A (en) * | 2016-03-29 | 2016-08-17 | 东莞华贝电子科技有限公司 | Auxiliary identifying method and auxiliary identifying system for automated testing |
US9424167B2 (en) * | 2014-05-21 | 2016-08-23 | Cgi Technologies And Solutions Inc. | Automated testing of an application system |
CN105955881A (en) * | 2016-04-22 | 2016-09-21 | 百度在线网络技术(北京)有限公司 | Automated test step recording and playback method and apparatus |
CN106095666A (en) * | 2016-06-02 | 2016-11-09 | 腾讯科技(深圳)有限公司 | Game automated testing method and relevant apparatus |
CN106445816A (en) * | 2016-09-07 | 2017-02-22 | 美的智慧家居科技有限公司 | Control execution method and apparatus |
CN106897225A (en) * | 2017-02-27 | 2017-06-27 | 网易(杭州)网络有限公司 | Record method, device and the electronic equipment of test script |
-
2019
- 2019-01-23 CN CN201910064281.XA patent/CN109871172B/en active Active
Patent Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101242621A (en) * | 2008-01-21 | 2008-08-13 | 中兴通讯股份有限公司 | An automatic testing method and system based on interface |
CN103678106A (en) * | 2012-09-19 | 2014-03-26 | 腾讯科技(深圳)有限公司 | Method and device for content recording |
US20140089904A1 (en) * | 2012-09-26 | 2014-03-27 | Compuware Corporation | Technique for simulating an orientation change event in a test environment |
CN103543923A (en) * | 2013-07-23 | 2014-01-29 | Tcl集团股份有限公司 | Control clicking event processing method and system |
CN104849576A (en) * | 2014-02-13 | 2015-08-19 | 广东小天才科技有限公司 | Automatic test system and test method |
CN105022687A (en) * | 2014-04-22 | 2015-11-04 | 腾讯科技(深圳)有限公司 | Implementation method and device of sliding operation in automated testing scheme |
US9424167B2 (en) * | 2014-05-21 | 2016-08-23 | Cgi Technologies And Solutions Inc. | Automated testing of an application system |
CN105138316A (en) * | 2015-07-23 | 2015-12-09 | 中山大学深圳研究院 | Automatic clicking method and device based on super sketchpad |
CN105183599A (en) * | 2015-09-08 | 2015-12-23 | 上海斐讯数据通信技术有限公司 | Script recording system and method |
CN105138463A (en) * | 2015-09-25 | 2015-12-09 | 成都中科创达软件有限公司 | Testing method and system for mobile terminal software |
CN105740153A (en) * | 2016-02-29 | 2016-07-06 | 网易(杭州)网络有限公司 | Cloud testing method and device |
CN105740874A (en) * | 2016-03-04 | 2016-07-06 | 网易(杭州)网络有限公司 | Method and device for determining operation coordinate of automation test script during playback |
CN105866574A (en) * | 2016-03-29 | 2016-08-17 | 东莞华贝电子科技有限公司 | Auxiliary identifying method and auxiliary identifying system for automated testing |
CN105955881A (en) * | 2016-04-22 | 2016-09-21 | 百度在线网络技术(北京)有限公司 | Automated test step recording and playback method and apparatus |
CN106095666A (en) * | 2016-06-02 | 2016-11-09 | 腾讯科技(深圳)有限公司 | Game automated testing method and relevant apparatus |
CN106445816A (en) * | 2016-09-07 | 2017-02-22 | 美的智慧家居科技有限公司 | Control execution method and apparatus |
CN106897225A (en) * | 2017-02-27 | 2017-06-27 | 网易(杭州)网络有限公司 | Record method, device and the electronic equipment of test script |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113555131A (en) * | 2021-05-20 | 2021-10-26 | 浙江警察学院 | Psychophysical testing method, apparatus and medium for rewarding motivation of drug addict |
CN113391752A (en) * | 2021-06-21 | 2021-09-14 | 昆明理工大学 | Interaction technology of mouse-based touch interactive equipment |
CN113391752B (en) * | 2021-06-21 | 2023-11-14 | 昆明理工大学 | Interaction method of touch interaction equipment based on mouse |
Also Published As
Publication number | Publication date |
---|---|
CN109871172B (en) | 2020-09-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110347152B (en) | Virtual wall setting method, system and device | |
US7843450B2 (en) | System and method for filtering point clouds | |
CN104462979B (en) | The automation dynamic testing method and device of a kind of application program | |
CN109326323A (en) | A kind of assemble method and device of genome | |
CN108833459A (en) | Data reporting method and terminal equipment | |
CN105955888A (en) | Page debugging and previewing method and system | |
CN109871172A (en) | Mouse click method, device and readable storage medium storing program for executing in a kind of automatic test | |
CN107886300A (en) | Billboard card management method, apparatus, computer equipment and storage medium | |
CN105893390A (en) | Application program processing method and electronic equipment | |
CN105786695A (en) | Data test method and system | |
CN103559162B (en) | Method and host for positioning USB (universal serial bus) devices on HUB set | |
CN109447384A (en) | Verification method, device, equipment and the storage medium of air control system | |
CN107247827B (en) | Virtual terminal model modeling and automatic wiring method based on machine learning | |
CN111191408A (en) | PCB element layout verification method and device, server and storage medium | |
CN110378336A (en) | Semantic level labeling method and device for target object in training sample and storage medium | |
CN106645868A (en) | Scanning method and device for short-circuit current | |
CN110175520A (en) | Text position detection method and device for robot inspection image and storage medium | |
CN107505945A (en) | Edit dot position adjusting method and device in course line | |
CN103870624B (en) | Simulation analysis template for hung crossbeam | |
CN106202162B (en) | It is a kind of for test recommend room data list test macro and method | |
CN108038127A (en) | A kind of method, apparatus, terminal device and the storage medium of data synchronization | |
CN114520978B (en) | Method and system for automatically arranging base stations in network planning simulation | |
CN107943857A (en) | Automatic method, apparatus, terminal device and the storage medium for reading AutoCAD forms | |
CN110895460A (en) | Jenkins-based robot system integration method and device and terminal equipment | |
CN109905253A (en) | A kind of log information acquisition method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |