CN109144868A - A kind of page judgment method and device - Google Patents
A kind of page judgment method and device Download PDFInfo
- Publication number
- CN109144868A CN109144868A CN201810930267.9A CN201810930267A CN109144868A CN 109144868 A CN109144868 A CN 109144868A CN 201810930267 A CN201810930267 A CN 201810930267A CN 109144868 A CN109144868 A CN 109144868A
- Authority
- CN
- China
- Prior art keywords
- control
- page
- tested
- display
- display position
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The invention discloses a kind of page judgment method and devices.The described method includes: showing the page to be tested on current device;Obtain the display position of each control on the page to be tested;According to the display position of each control, judge whether the page to be tested shows exception.According to the technical solution of the present invention, it can judge automatically whether the page to be tested shows exception according to the display position of each control, to improve the efficiency and accuracy of page exception judgement to be tested.
Description
Technical field
The present invention relates to the field of test technology, in particular to a kind of page judgment method and device.
Background technique
Currently, can only check the function of application for for UI (User Interface, User Page) automatic test
It is whether correct, for UI show whether correctly especially in the equipment of different resolution UI whether can normal presentation still need
By screenshot again by manually being determined.Therefore, it is abnormal as urgent problem to be solved how quickly to judge whether the page shows.
Summary of the invention
The present invention provides a kind of page judgment method and device, to the display position according to each control, judge automatically to
Whether test page shows exception, to improve the efficiency and accuracy of page exception judgement to be tested.
The present invention provides a kind of page judgment method, comprising:
The page to be tested is shown on current device;
Obtain the display position of each control on the page to be tested;
According to the display position of each control, judge whether the page to be tested shows exception.
In one embodiment, the display position for obtaining each control on the page to be tested, comprising:
Determine the visible control in each control;
Determine display position of the visible control relative to the page to be tested.
In one embodiment, the display position according to each control, judges whether the page to be tested shows
Show exception, comprising:
According to the display position of each control, the case where judgement between each control with the presence or absence of overlapping display;
When the judgment result is yes, determine that the page display to be tested is abnormal.
In one embodiment, the display position according to each control, judges whether the page to be tested shows
Show exception, comprising:
According to the display size of the display position of each control and the on-screen display (osd) area of the current device, institute is judged
It states in each control with the presence or absence of the control beyond the on-screen display (osd) area;
When the judgment result is yes, determine that the page display to be tested is abnormal.
In one embodiment, the method also includes:
According to the display position of each control, the position coordinates figure of each control is generated;
The position coordinates figure is shown.
The present invention also provides a kind of page judgment means, comprising:
First display module, for showing the page to be tested on current device;
Module is obtained, for obtaining the display position of each control on the page to be tested;
Judgment module judges whether the page to be tested shows exception for the display position according to each control.
In one embodiment, the acquisition module includes:
First determines submodule, for determining the visible control in each control;
Second determines submodule, for determining display position of the visible control relative to the page to be tested.
In one embodiment, the judgment module includes:
First judging submodule judges whether deposit between each control for the display position according to each control
The case where being overlapped display;
First decision sub-module, for when the judgment result is yes, determining that the page display to be tested is abnormal.
In one embodiment, the judgment module includes:
Second judgment submodule, for according to the display position of each control and the screen display area of the current device
The display size in domain judges in each control with the presence or absence of the control beyond the on-screen display (osd) area;
Second decision sub-module, for when the judgment result is yes, determining that the page display to be tested is abnormal.
In one embodiment, described device further include:
Generation module generates the position coordinates figure of each control for the display position according to each control;
Second display module, for showing the position coordinates figure.
The technical scheme provided by this disclosed embodiment can include the following benefits:
By obtaining the display position of each control on the page to be tested, can be judged automatically according to the display position of each control
Whether the page to be tested shows exception, to improve the efficiency and accuracy of page exception judgement to be tested.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification
It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention can be by written explanation
Specifically noted structure is achieved and obtained in book, claims and attached drawing.
Below by drawings and examples, technical scheme of the present invention will be described in further detail.
Detailed description of the invention
Attached drawing is used to provide further understanding of the present invention, and constitutes part of specification, with reality of the invention
It applies example to be used to explain the present invention together, not be construed as limiting the invention.In the accompanying drawings:
Fig. 1 is a kind of flow chart of page judgment method shown according to an exemplary embodiment.
Fig. 2 is the flow chart of another page judgment method shown according to an exemplary embodiment.
Fig. 3 is the flow chart of another page judgment method shown according to an exemplary embodiment.
Fig. 4 is the position coordinates figure that a kind of control shown according to an exemplary embodiment overflows on-screen display (osd) area.
Fig. 5 is a kind of block diagram of page judgment means shown according to an exemplary embodiment.
Fig. 6 is the block diagram of another page judgment means shown according to an exemplary embodiment.
Specific embodiment
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings, it should be understood that preferred reality described herein
Apply example only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention.
In order to solve the above-mentioned technical problem, the embodiment of the present disclosure provides a kind of page judgment method, and this method is suitable for
In page determining program, system or device, executing subject can be the equipment such as mobile phone, plate, computer, as shown in Figure 1, should
Method includes step S101 to step S103, in which:
In step s101, the page to be tested is shown on current device;
In step s 102, the display position of each control on the page to be tested is obtained;
The page to be tested can be any need page to be tested.Each control includes on the page to be tested on the page to be tested
All controls, it is preferable that show control on the page to be tested.
In step s 103, according to the display position of each control, judge whether the page to be tested shows exception.
By obtaining the display position of each control on the page to be tested, can be judged automatically according to the display position of each control
Whether the page to be tested shows exception, to improve the efficiency and accuracy of page exception judgement to be tested.
As shown in Fig. 2, in one embodiment, above-mentioned step S102 shown in FIG. 1 is obtained and is respectively controlled on the page to be tested
The display position of part may include step A1 and step A2:
In step A1, the visible control in each control is determined;
In step A2, display position of the visible control relative to the page to be tested is determined.
Due to recessive control (i.e. invisible control) regardless of whether there is display abnormal problem, user's vision will not influence
Experience, thus, it may be determined that the visible control in each control, and then automatically determine display of the visible control relative to the page to be tested
Position, in order to judge automatically whether the page to be tested shows exception according to the display position of visible control.
Secondly, only determining display position of the display position compared to all controls in the determination page to be tested of visible control
For, can effectively improve the page to be tested whether the judging efficiency of abnormal show.
In addition, it is seen that control is (such as visible relative to the corner that the display position of the page to be tested may include: visible control
Four vertex of control) display position relative to the page to be tested, and determine visible control relative to the aobvious of the page to be tested
The step of showing position can be performed as:
Determine abscissa and ordinate of the top left corner apex relative to the page to be tested of visible control;
According to aforesaid abscissa, the length and width of aforementioned ordinate and visible control, remaining corner of the visible control is determined (such as
Its excess-three vertex) abscissa and ordinate relative to the page to be tested.
In one embodiment, above-mentioned step S103 shown in FIG. 1 judges to be measured that is, according to the display position of each control
Whether the examination page shows exception, can be performed as:
According to the display position of each control, the case where judgement between each control with the presence or absence of overlapping display;
When the judgment result is yes, determine that page display to be tested is abnormal.
According to the display position of each control, it can determine whether between each control that (i.e. two control of arbitrary neighborhood) is aobvious with the presence or absence of overlapping
The case where showing (i.e. whether two control of arbitrary neighborhood has least partially overlapped), when judging result is the presence of the case where overlapping display
When, illustrate that the control in the page to be tested is not shown normally, can determine that page display to be tested is abnormal automatically, and this automation
Judgment mode is conducive to improve the abnormal judging efficiency of page display.
In one embodiment, above-mentioned step S103 shown in FIG. 1 judges to be measured that is, according to the display position of each control
Whether the examination page shows exception, can be performed as:
According to the display size of the display position of each control and the on-screen display (osd) area of current device, judge be in each control
It is no to there is the control for exceeding on-screen display (osd) area;
When the judgment result is yes, determine that page display to be tested is abnormal.
It, can be by judging each control according to the display size of the display position of each control and the on-screen display (osd) area of current device
Whether the display position of part, which does not fall in the display size of on-screen display (osd) area to judge automatically to whether there is in each control, exceeds
The control of on-screen display (osd) area illustrates in the page to be tested when judging result is in the presence of the control for exceeding on-screen display (osd) area
In the presence of the control for overflowing on-screen display (osd) area, thus, it can determine that the page to be tested display is abnormal automatically, and this automatization judgement
Mode is conducive to improve the abnormal judging efficiency of page display.
In one embodiment, method further include:
According to the display position of each control, the position coordinates figure of each control is generated;
Position coordinates figure is shown.
According to the display position of each control, the position coordinates figure of each control can also be automatically generated, and then by position coordinates
Figure is shown automatically, so that tester can intuitively understand in the display position and each control of each control with the presence or absence of weight
The problem of display, is overflowed in folded display.
As shown in figure 3, citing is further illustrated technical solution of the present invention below:
Step S301: enter the page to be tested.
Step S302: obtaining all visiable attributes (display properties) in the page to be tested is control (the i.e. institute of true
Have visible control) location information.
Step S303: determining whether that there are the overlappings of any two control according to the location information of all visible controls, if
With the presence of any two control regions overlapping cases or there is the control for having exceeded on-screen display (osd) area (as shown in figure 4, Fig. 4
It is the position coordinates figure generated according to the location information of all visible controls, each grid indicates a visible control in Fig. 4,
As seen from Figure 4, there is the visible control for showing TEXT printed words beyond on-screen display (osd) area), then it is aobvious to determine that the page exists
The property shown problem.
As shown in figure 5, the present invention also provides a kind of page judgment means, comprising:
First display module 501 is configured as showing the page to be tested on current device;
Module 502 is obtained, is configured as obtaining the display position of each control on the page to be tested;
Judgment module 503 is configured as the display position according to each control, judges whether the page to be tested shows exception.
As shown in fig. 6, in one embodiment, obtaining module 502 may include:
First determines submodule 5021, the visible control being configured to determine that in each control;
Second determines submodule 5022, is configured to determine that display position of the visible control relative to the page to be tested.
In one embodiment, judgment module includes:
First judging submodule is configured as the display position according to each control, judges between each control with the presence or absence of weight
The case where folded display;
First decision sub-module is configured as when the judgment result is yes, determining that page display to be tested is abnormal.
In one embodiment, judgment module includes:
Second judgment submodule is configured as the on-screen display (osd) area of the display position and current device according to each control
Display size judges in each control with the presence or absence of the control beyond on-screen display (osd) area;
Second decision sub-module is configured as when the judgment result is yes, determining that page display to be tested is abnormal.
In one embodiment, device further include:
Generation module is configured as the display position according to each control, generates the position coordinates figure of each control;
Second display module is configured as showing in position coordinates figure.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
Finally, the page judgment means in the present invention are suitable for terminal device.For example, it may be mobile phone, computer,
Digital broadcasting terminal, messaging device, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant
Deng.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The shape for the computer program product implemented in usable storage medium (including but not limited to magnetic disk storage and optical memory etc.)
Formula.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (10)
1. a kind of page judgment method characterized by comprising
The page to be tested is shown on current device;
Obtain the display position of each control on the page to be tested;
According to the display position of each control, judge whether the page to be tested shows exception.
2. the method according to claim 1, wherein
The display position for obtaining each control on the page to be tested, comprising:
Determine the visible control in each control;
Determine display position of the visible control relative to the page to be tested.
3. the method according to claim 1, wherein
The display position according to each control, judges whether the page to be tested shows exception, comprising:
According to the display position of each control, the case where judgement between each control with the presence or absence of overlapping display;
When the judgment result is yes, determine that the page display to be tested is abnormal.
4. the method according to claim 1, wherein
The display position according to each control, judges whether the page to be tested shows exception, comprising:
According to the display size of the display position of each control and the on-screen display (osd) area of the current device, judge described each
With the presence or absence of the control beyond the on-screen display (osd) area in control;
When the judgment result is yes, determine that the page display to be tested is abnormal.
5. method according to claim 1 to 4, which is characterized in that the method also includes:
According to the display position of each control, the position coordinates figure of each control is generated;
The position coordinates figure is shown.
6. a kind of page judgment means characterized by comprising
First display module, for showing the page to be tested on current device;
Module is obtained, for obtaining the display position of each control on the page to be tested;
Judgment module judges whether the page to be tested shows exception for the display position according to each control.
7. device according to claim 6, which is characterized in that
The acquisition module includes:
First determines submodule, for determining the visible control in each control;
Second determines submodule, for determining display position of the visible control relative to the page to be tested.
8. device according to claim 6, which is characterized in that
The judgment module includes:
First judging submodule judges between each control for the display position according to each control with the presence or absence of weight
The case where folded display;
First decision sub-module, for when the judgment result is yes, determining that the page display to be tested is abnormal.
9. device according to claim 6, which is characterized in that
The judgment module includes:
Second judgment submodule, for according to the on-screen display (osd) area of the display position and current device of each control
Display size judges in each control with the presence or absence of the control beyond the on-screen display (osd) area;
Second decision sub-module, for when the judgment result is yes, determining that the page display to be tested is abnormal.
10. device according to any one of claims 6 to 9, which is characterized in that described device further include:
Generation module generates the position coordinates figure of each control for the display position according to each control;
Second display module, for showing the position coordinates figure.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810930267.9A CN109144868B (en) | 2018-08-15 | 2018-08-15 | Page judgment method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810930267.9A CN109144868B (en) | 2018-08-15 | 2018-08-15 | Page judgment method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109144868A true CN109144868A (en) | 2019-01-04 |
CN109144868B CN109144868B (en) | 2022-02-01 |
Family
ID=64789698
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810930267.9A Active CN109144868B (en) | 2018-08-15 | 2018-08-15 | Page judgment method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109144868B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109857659A (en) * | 2019-01-23 | 2019-06-07 | 广州云测信息技术有限公司 | A kind of operating method and device of control |
CN110162460A (en) * | 2019-04-15 | 2019-08-23 | 平安普惠企业管理有限公司 | Application exception positioning problems method, apparatus, computer equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105740143A (en) * | 2016-01-27 | 2016-07-06 | 厦门美图移动科技有限公司 | Automated test method and apparatus as well as computing device |
CN105988933A (en) * | 2016-01-29 | 2016-10-05 | 腾讯科技(深圳)有限公司 | Interface operable node identification method and application test method, device and system |
CN107704389A (en) * | 2017-09-26 | 2018-02-16 | 无线生活(杭州)信息科技有限公司 | A kind of page method of testing and device |
US20180067842A1 (en) * | 2016-09-07 | 2018-03-08 | International Business Machines Corporation | Applying eye trackers monitoring for effective exploratory user interface testing |
CN107832774A (en) * | 2017-10-09 | 2018-03-23 | 无线生活(杭州)信息科技有限公司 | A kind of page exception detection method and device |
CN108132887A (en) * | 2018-01-10 | 2018-06-08 | 百度在线网络技术(北京)有限公司 | User interface method of calibration, device, software testing system, terminal and medium |
US20180173618A1 (en) * | 2016-01-16 | 2018-06-21 | Ping An Technology (Shenzhen) Co., Ltd. | Test method, system, and device, and readable storage medium |
CN108363599A (en) * | 2018-01-12 | 2018-08-03 | 深圳壹账通智能科技有限公司 | User interface shows recognition methods and terminal device |
-
2018
- 2018-08-15 CN CN201810930267.9A patent/CN109144868B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180173618A1 (en) * | 2016-01-16 | 2018-06-21 | Ping An Technology (Shenzhen) Co., Ltd. | Test method, system, and device, and readable storage medium |
CN105740143A (en) * | 2016-01-27 | 2016-07-06 | 厦门美图移动科技有限公司 | Automated test method and apparatus as well as computing device |
CN105988933A (en) * | 2016-01-29 | 2016-10-05 | 腾讯科技(深圳)有限公司 | Interface operable node identification method and application test method, device and system |
US20180067842A1 (en) * | 2016-09-07 | 2018-03-08 | International Business Machines Corporation | Applying eye trackers monitoring for effective exploratory user interface testing |
CN107704389A (en) * | 2017-09-26 | 2018-02-16 | 无线生活(杭州)信息科技有限公司 | A kind of page method of testing and device |
CN107832774A (en) * | 2017-10-09 | 2018-03-23 | 无线生活(杭州)信息科技有限公司 | A kind of page exception detection method and device |
CN108132887A (en) * | 2018-01-10 | 2018-06-08 | 百度在线网络技术(北京)有限公司 | User interface method of calibration, device, software testing system, terminal and medium |
CN108363599A (en) * | 2018-01-12 | 2018-08-03 | 深圳壹账通智能科技有限公司 | User interface shows recognition methods and terminal device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109857659A (en) * | 2019-01-23 | 2019-06-07 | 广州云测信息技术有限公司 | A kind of operating method and device of control |
CN109857659B (en) * | 2019-01-23 | 2022-03-15 | 北京云测信息技术有限公司 | Control operation method and device |
CN110162460A (en) * | 2019-04-15 | 2019-08-23 | 平安普惠企业管理有限公司 | Application exception positioning problems method, apparatus, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109144868B (en) | 2022-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108027650B (en) | Method for measuring angle between displays and electronic device using the same | |
CN103258491B (en) | A kind of method controlling electronic equipment and electronic equipment | |
US9842417B2 (en) | Computing device and method for simplifying point cloud of object | |
EP2871560B1 (en) | Image processing method and apparatus | |
US8531487B2 (en) | Software for displays with different pixel densities | |
CN111816139B (en) | Screen refresh rate switching method and electronic equipment | |
CN104035664A (en) | Display method and device for user interface of application program | |
CN105787402A (en) | Information display method and device | |
CN104991705A (en) | Interface display method and terminal | |
CN109144868A (en) | A kind of page judgment method and device | |
CN104881888B (en) | Picture clipping method and device | |
US10061494B2 (en) | Method and device for webpage zooming on electronic apparatus | |
CN104317539A (en) | Information processing method and electronic equipment | |
CN104615331A (en) | Corner mark processing method | |
CN113986426B (en) | Image detection method and device, readable medium and electronic equipment | |
CN105511829A (en) | Method and system for adaptively adjusting display scale of office software | |
WO2015181830A1 (en) | User account switching interface | |
CN103677518B (en) | Touch message responding method on a kind of mobile terminal and device | |
JPWO2012124279A1 (en) | Input device | |
US9354772B2 (en) | Method and device for movement of image object | |
CN115797182B (en) | Feature map interpolation method, device, equipment and storage medium | |
CN103324738B (en) | A kind of method and apparatus of alignment after webpage zoom on electronic equipment | |
CN109819329A (en) | A kind of window display method and smart television | |
CN109710911B (en) | Content typesetting method and device for cells, electronic equipment and storage medium | |
CN112416189B (en) | Cross-page focus searching method and device and electronic equipment |
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 |