CN103455414B - Obtain the method and device of the logical place of control - Google Patents
Obtain the method and device of the logical place of control Download PDFInfo
- Publication number
- CN103455414B CN103455414B CN201210180795.XA CN201210180795A CN103455414B CN 103455414 B CN103455414 B CN 103455414B CN 201210180795 A CN201210180795 A CN 201210180795A CN 103455414 B CN103455414 B CN 103455414B
- Authority
- CN
- China
- Prior art keywords
- control
- interface
- level
- control information
- measured
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 29
- 238000012360 testing method Methods 0.000 claims description 22
- 230000001174 ascending effect Effects 0.000 claims description 20
- 230000001351 cycling effect Effects 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000010422 painting Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 2
- 241000406668 Loxodonta cyclotis Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 239000003973 paint Substances 0.000 description 1
- 238000011056 performance test Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Testing Or Calibration Of Command Recording Devices (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of method and device for the logical place for obtaining control, belong to field of computer technology.Methods described includes:Obtain the control information of the control in the interface of measurand, the annexation set up according to the control information between the control in the interface;The tree structure of the control in the interface is generated according to the annexation;When obtaining the logical place of control to be measured in the interface, the logical place of the control to be measured is obtained according to the tree structure.The invention also discloses a kind of device for the logical place for obtaining control, described device includes:Relating module, generation module and the first acquisition module.The tree structure that the present invention is drawn out by basis intuitively obtains the logical place of control to be measured, simplifies the operation for the logical place for obtaining control to be measured, saves substantial amounts of manpower and time, improves acquisition efficiency.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method and device for the logical place for obtaining control.
Background technology
At present, automatic test has been increasingly being applied to testing field, and it not only saves manpower and time, and
Improve testing efficiency.Before the control to be measured in for measurand writes test script, tester needs acquisition, and this is treated
Logical place of the observing and controlling part in interface, to write the test pin of the control to be measured according to the logical place of the control to be measured
This.
Prior art obtains the control in the interface of measurand by the Instruments UIAutomation instruments carried
The control information of part, and the control information is stored in Plist files in the form of text, by traveling through Plist files
Logical place of the control to be measured in interface is known, so as to write test script according to the logical place.
During the present invention is realized, inventor has found that prior art at least has the following disadvantages:
Control information in traversal Plist files knows the logical place of control to be measured, and complex operation is wasted substantial amounts of
It is manpower and time, less efficient.
The content of the invention
The embodiments of the invention provide a kind of method and device for the logical place for obtaining control, observing and controlling is treated to simplify acquisition
The operation of the logical place of part, improves and obtains efficiency.The technical scheme is as follows:
On the one hand there is provided a kind of method for the logical place for obtaining control, methods described includes:
Control in the interface of advance perform script traversal measurand obtains the control information of the control in the interface,
The control information includes the level of control;
It is better than the principle of control arrangement at the same level according to the ascending order of control number of levels and child control, by what is obtained
The control information storage is in one file;
The control information of the control in the interface is sequentially read from the file, and successively by the control information of reading
As current control information, circulation performs following steps, is finished until the control information in the file is read, to set up
State the annexation between the control in interface:According to the current control information judge corresponding current control whether level
For 1;If it is, determining that the current control is root control;If it is not, then searching level ratio in the control information read
The nearest control of level small 1 and position of the current control, using the control found as the current control father's control
Establish a connection;
Generated and shown in the tree structure of the control in the interface, the tree structure often according to the annexation
The unique mark of one control;
When obtaining the logical place of control to be measured in the interface, the control to be measured is obtained according to the tree structure
Logical place.
Further, the tree structure of the control in the interface is generated according to the annexation, including:
According to the annexation, it is better than control at the same level according to the ascending order of control number of levels and child control and paints
The principle of system, draws the tree structure of the control in the interface.
Preferably, after the logical place that the control to be measured is obtained according to the tree structure, in addition to:
Root control is determined to the path of the control to be measured according to the logical place of the control to be measured, for described
The test script of the control to be measured writes when measurand is tested.
On the other hand, a kind of device for the logical place for obtaining control is additionally provided, described device includes:
Relating module, the control information of the control in interface for obtaining measurand, builds according to the control information
The annexation between the control in the interface is found, the control information includes the level of control;
Generation module, the tree structure for generating the control in the interface according to the annexation is described tree-like
The unique mark of each control is shown in structure;
First acquisition module, for when obtaining the logical place of control to be measured in the interface, according to the tree-like knot
Structure obtains the logical place of the control to be measured;
Wherein, described device also includes:
Second acquisition module, the control traveled through for advance perform script in the interface obtains the control in the interface
Control information;
Memory module, for being better than control arrangement at the same level according to the ascending order of control number of levels and child control
Principle, by the storage of the obtained control information in one file;
The relating module includes:Cycling element, judging unit, the first associative cell and the second associative cell;
The cycling element, the control information for sequentially reading the control in the interface from the file, and according to
The secondary control information using reading is used as current control information, the circulation triggering judging unit, the first associative cell and second
Associative cell, is finished until the control information in the file is read:
The judging unit, for judging corresponding current control according to the current control information, whether level is 1;
First associative cell, for judging the corresponding current control of current control information when the judging unit
When level is 1, it is root control to determine the current control;
Second associative cell, for judging the corresponding current control of current control information when the judging unit
When level is not 1, level smaller than the level of the current control 1 and the control of position recently are searched in the control information read
Part, father's control of the control found as the current control is established a connection.
The generation module is used for, and according to the annexation, is controlled according to the ascending order of control number of levels and son
Part is better than the principle of ActiveX drafting at the same level, draws the tree structure of the control in the interface.
First acquisition module is additionally operable to, according to the tree structure obtain the control to be measured logical place it
Afterwards, root control is determined to the path of the control to be measured according to the logical place of the control to be measured, for described tested
The test script of the control to be measured writes when object is tested.
The beneficial effect of technical scheme provided in an embodiment of the present invention is:
The control information of the control in interface by obtaining measurand, the control set up according to the control information in interface
Annexation between part, and according to the tree structure of the control in annexation generation interface, can be according to the tree structure
The logical place of control to be measured is intuitively obtained, the operation for the logical place for obtaining control to be measured is simplified, saves substantial amounts of
Manpower and time, improve acquisition efficiency.
By according to annexation, being better than control at the same level according to the ascending order of control number of levels and child control and painting
The principle of system, draws the tree structure of the control in interface, intuitively can show logical place of the control in interface to user,
So as to improve acquisition efficiency.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, makes required in being described below to embodiment
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for
For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings
Accompanying drawing.
Fig. 1 is a kind of method flow diagram of the logical place for acquisition control that the embodiment of the present invention one is provided;
Fig. 2 is a kind of method flow diagram of the logical place for acquisition control that the embodiment of the present invention two is provided;
Fig. 3 is a kind of hierarchical relationship schematic diagram for control that the embodiment of the present invention two is provided;
Fig. 4 is a kind of storage organization schematic diagram for control information that the embodiment of the present invention two is provided;
Fig. 5 is a kind of tree structure schematic diagram for control information that the embodiment of the present invention two is provided;
Fig. 6 is a kind of structural representation of the device of the logical place for acquisition control that the embodiment of the present invention three is provided;
Fig. 7 is the structural representation of the device of the logical place for another acquisition control that the embodiment of the present invention three is provided.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention
Formula is described in further detail.
The present embodiment is related to a kind of method for the logical place that control is obtained in the interface of measurand, involved quilt
It can be any product with UI interfaces, including but not limited to hardware product and software product to survey object.The hardware product
Including but not limited to:Mobile phone, tablet personal computer, PDA (Personal Digital Assistant, personal digital assistant), broadcasting
Device, server, computer etc.;The software product includes but is not limited to:QQ, EXCEL and browser etc..
In addition, the application platform of the present invention includes but is not limited to IOS (iphone Operation System, apple operation
System) platform, accordingly, the measurand can be the application program developed based on ios platform, such as iphone QQ,
Iphone browsers and ipad QQMusicHD etc..
Embodiment one
Referring to Fig. 1, a kind of method for the logical place for obtaining control is present embodiments provided, this method flow is specific such as
Under:
101:Obtain the control information of the control in the interface of measurand, the control set up according to the control information in interface
Annexation between part.
102:The tree structure of the control in interface is generated according to the annexation of above-mentioned foundation.
103:When obtaining the logical place of control to be measured in interface, obtained according to the tree structure of above-mentioned generation and treat observing and controlling
The logical place of part.
Wherein, before the control information of the control in the interface of acquisition measurand, in addition to:
Control in advance perform script traversal interface obtains the control information of the control in interface;
It is better than the principle of control arrangement at the same level according to the ascending order of control number of levels and child control, by what is obtained
Control information is stored in one file.
Specifically, the control information of the control in the interface of measurand is obtained, is set up according to the control information in interface
Control between annexation, including:
Sequentially read the control information of the control in interface from file, and successively using the control information of reading as current
Control information, circulation perform following steps, until in file control information read finish:
Judging corresponding current control according to current control information, whether level is 1;
If it is, determining that current control is root control;
If it is not, then it is nearest to search in the control information read level smaller than the level of current control 1 and position
Control, father's control of the control found as current control is established a connection.
Further, the tree structure of the control in interface is generated according to the annexation of above-mentioned foundation, including:
According to the annexation of above-mentioned foundation, it is better than according to the ascending order of control number of levels and child control at the same level
The principle of ActiveX drafting, draws the tree structure of the control in interface.
Preferably, after the logical place that control to be measured is obtained according to the tree structure of above-mentioned generation, in addition to:
Root control is determined to the path of control to be measured according to the logical place of control to be measured, for being carried out to measurand
The test script of control to be measured writes during test.
The above method that the present embodiment is provided, the control information of the control in interface by obtaining measurand, according to
The annexation that the control information is set up between the control in interface, and according to the tree of the control in annexation generation interface
Shape structure, can intuitively obtain the logical place of control to be measured according to the tree structure, simplify the logic for obtaining control to be measured
The operation of position, saves substantial amounts of manpower and time, improves acquisition efficiency.
By according to annexation, being better than control at the same level according to the ascending order of control number of levels and child control and painting
The principle of system, draws the tree structure of the control in interface, intuitively can show logical place of the control in interface to user,
So as to improve acquisition efficiency.
Embodiment two
Referring to Fig. 2, a kind of method for the logical place for obtaining control is present embodiments provided, this method flow is specific such as
Under:
201:Control in the interface of advance perform script traversal measurand obtains the control information of the control in interface.
Test object in automatic test is referred to as measurand by the present embodiment, tested pair write in advance by operation
The test script of elephant, can carry out performance test and pressure test to measurand.Measurand can include one or more
Interface, each interface can include one or more control, usually multiple controls.Wherein, control is a kind of UI (User
Interface, user interface) element, provide the user single interactive operation.For example, the measurand is music
During device, its interface included includes but is not limited to playlist interface, lyrics display interface, song search interface etc., is elected to
When fixed interface is song search interface, the control in the interface can be text box, button and Information etc..
Control information is the description information of control, includes level, type and the title of control.Preferably, control information is also
The coordinate and length and width etc. of value, control including control in interface.Wherein, the level of control is used for describing controlling in interface
The hierarchical relationship of part, level is smaller, and level of the corresponding control of the level in interface is higher;Level is bigger, the level
Level of the corresponding control in interface is lower.Specifically, said by the level setting up procedure of 1 pair of control of minimum level
It is bright.Referring to Fig. 3, it is assumed that comprising this 6 controls of A, B, C, D, E and F in interface, the relation between the control is that A is root control,
B and C is A child control, and D and E are B child control, and F is C child control, then the level that A level is 1, B and C is 2, D, E and
F level is 3.
In the present embodiment, script is using specific description language, the executable file write according to specific form.It is logical
Cross the script for performing and writing in advance, you can obtain the control information of the control in interface, do not repeat herein.
202:It is better than the principle of control arrangement at the same level according to the ascending order of control number of levels and child control, will
The control information storage arrived is in one file.
Referring to Fig. 4, still to be illustrated exemplified by above-mentioned A, B, C, D, E and F this 6 controls to step 202.Specifically, abide by
Follow according to the ascending tactic principle of control number of levels, A stored first, then store A child control B,
Because B includes child control D and E, it then follows child control is better than the principle of control arrangement at the same level, and preferentially B child control D and E are carried out
Storage, because D and E does not include child control, is then stored to B control C at the same level, finally stores C child control F, therefore,
Control information puts in order as ABDECF in file.
203:The control information of the control in interface is sequentially read from file, is set up according to the control information in interface
Annexation between control.
This step is specifically included:
Sequentially read the control information of the control in interface from file, and successively using the control information of reading as current
Control information, circulation perform following steps, until in file control information read finish:
Judging corresponding current control according to current control information, whether level is 1;
If it is, determining that current control is root control;
If it is not, then it is nearest to search in the control information read level smaller than the level of current control 1 and position
Control, father's control of the control found as current control is established a connection.
Specifically, still to be illustrated exemplified by above-mentioned A, B, C, D, E and F this 6 controls, then the reading order of control information
For ABDECF, the step of setting up the annexation between the control in interface is as follows:
1. the level in A control information is read, the level is 1, it is determined that A is root control;
2. the level in B control information is read, the level is the control in 2, and the control read with B location recently
Part is A, then judging A level, whether level than B is small by 1, because A level of the level than B is small by 1, it is determined that A is controlled for B father
Part;
3. the level in D control information is read, the level is the control in 3, and the control read with D positions recently
Part is B, then judging B level, whether level than D is small by 1, because B level of the level than D is small by 1, it is determined that B is controlled for D father
Part;
4. the level in E control information is read, the level is the control in 3, and the control read with E positions recently
Part is D, then judging D level, whether level than E is small by 1, because D level and E level are equal, then obtains D father's control B
Level, judging B level, whether level than E is small by 1, because B level of the level than E is small by 1, it is determined that B is controlled for E father
Part;
5. the level in C control information is read, the level is the control in 2, and the control read with location of C recently
Part is E, then judging E level, whether level than C is small by 1, because E level of the level than C is big by 1, then obtains E father's control B
Level, judging B level, whether level than C is small by 1, because B level and C level are equal, then obtains B father's control A
Level, judging A level, whether level than C is small by 1, because A level of the level than C is small by 1, it is determined that A is controlled for E father
Part;
6. the level in F control information is read, the level is the control in 3, and the control read with F positions recently
Part is C, then judging C level, whether level than F is small by 1, because C level of the level than F is small by 1, it is determined that C is controlled for F father
Part;
The annexation that can be set up between A, B, C, D, E and F according to above-mentioned 6 steps.
204:The tree structure of the control in interface is generated according to the annexation of above-mentioned foundation.
In the present embodiment, included according to the tree structure that the annexation of above-mentioned foundation generates the control in interface:
According to the annexation of above-mentioned foundation, it is better than according to the ascending order of control number of levels and child control at the same level
The principle of ActiveX drafting, draws the tree structure of the control in interface.
Referring to Fig. 5, still to be illustrated exemplified by above-mentioned A, B, C, D, E and F this 6 controls, according to what is set up in step 203
Annexation, it then follows the principle drawn according to the ascending order of control number of levels, draws to A, then draws A first
Child control B, because B includes child control D and E, it then follows child control is better than the principle of ActiveX drafting at the same level, preferentially B is controlled
Part D and E are drawn, and because D and E does not include child control, then B control C at the same level are drawn, and finally draw C
The drafting of the tree structure of control in control F, i.e. completion interface.
Further, draw tree structure in control node when, can be listed in the node control part or
All control informations, for identifying the control.Preferably, the type and title of the control are listed in the node, according to this
The type and title of control can uniquely identify the control, to improve drafting efficiency.
In the present embodiment, the tree structure of generation is stored by suffix name of .png, and general default storage is held in script
Under the catalogue of line program.Preferably, the store path of the tree structure is also may specify, to facilitate tester to the tree-like knot
Structure is checked.
205:When obtaining the logical place of control to be measured in interface, obtained according to the tree structure of above-mentioned generation and treat observing and controlling
The logical place of part.
In the present embodiment, logical place is position of the control in interface, can intuitively be got by tree structure.
Preferably, after the logical place that control to be measured is obtained according to the tree structure of above-mentioned generation, in addition to:According to treating
The logical place of observing and controlling part determines root control to the path of control to be measured, control to be measured during for testing measurand
Test script write.
Still to be illustrated exemplified by above-mentioned A, B, C, D, E and F this 6 controls, it is assumed that E is control to be measured, then by tree-like
Structure obtains logical places of the E in interface, you can the quick path for determining A to E is A->B->E, so that according to the path
Write E test script.
The above method that the present embodiment is provided, the control information of the control in interface by obtaining measurand, according to
The annexation that the control information is set up between the control in interface, and according to the tree of the control in annexation generation interface
Shape structure, can intuitively obtain the logical place of control to be measured according to the tree structure, simplify the logic for obtaining control to be measured
The operation of position, saves substantial amounts of manpower and time, improves acquisition efficiency.
By according to annexation, being better than control at the same level according to the ascending order of control number of levels and child control and painting
The principle of system, draws the tree structure of the control in interface, intuitively can show logical place of the control in interface to user,
So as to improve acquisition efficiency.
Embodiment three
Referring to Fig. 6, a kind of device for the logical place for obtaining control is present embodiments provided, the device includes:
Relating module 601, the control information of the control in interface for obtaining measurand, builds according to the control information
The annexation between control in delimitation face;
Generation module 602, the annexation for being set up according to relating module 601 generates the tree-like knot of the control in interface
Structure;
First acquisition module 603, for when obtaining the logical place of control to be measured in interface, according to generation module 602
The tree structure of generation obtains the logical place of control to be measured.
Referring to Fig. 7, in the present embodiment, described device also includes:
Second acquisition module 604, the control traveled through for advance perform script in interface obtains the control of the control in interface
Part information;
Memory module 605, is arranged for being better than control at the same level according to the ascending order of control number of levels and child control
Principle, the control information storage that the second acquisition module 604 is obtained is in one file.
Referring to Fig. 7, in the present embodiment, relating module 601 includes:Cycling element 601A, judging unit 601B, the first association
Unit 601C and the second associative cell 601D;
Cycling element 601A, the control information for sequentially reading the control in interface from file, and will read successively
Control information be used as current control information, circulation triggering judging unit 601B, the associations of the first associative cell 601C and second
Unit 601D, is finished until the control information in file is read:
Judging unit 601B, for judging corresponding current control according to current control information, whether level is 1;
First associative cell 601C, for judging the corresponding current control of current control information as judging unit 601B
When level is 1, it is root control to determine current control;
Second associative cell 601D, for judging the corresponding current control of current control information as judging unit 601B
When level is not 1, level smaller than the level of current control 1 and the nearest control in position are searched in the control information read,
Father's control of the control found as current control is established a connection.
In the present embodiment, generation module 602 is used for, according to annexation, according to the ascending order of control number of levels,
And child control is better than the principle of ActiveX drafting at the same level, draws the tree structure of the control in interface.
In the present embodiment, the first acquisition module 603 is additionally operable to, according to tree structure obtain control to be measured logical place it
Afterwards, root control is determined to the path of control to be measured according to the logical place of control to be measured, for testing measurand
When control to be measured test script write.
The device of the logical place for the above-mentioned acquisition control that the present embodiment is provided, can perform any of the above-described embodiment of the method
The method of the logical place of the acquisition control of middle offer, detailed process refers to the description in embodiment of the method, not repeated herein.
The device of the logical place for the acquisition control that the present embodiment is provided, the control in interface by obtaining measurand
Control information, the annexation set up according to the control information between the control in interface, and according to the annexation generate
The tree structure of control in interface, the logical place of control to be measured can be intuitively obtained according to the tree structure, simplifies and obtains
The operation of the logical place of control to be measured is taken, substantial amounts of manpower and time is saved, acquisition efficiency is improved.
By according to annexation, being better than control at the same level according to the ascending order of control number of levels and child control and painting
The principle of system, draws the tree structure of the control in interface, intuitively can show logical place of the control in interface to user,
So as to improve acquisition efficiency.
It should be noted that:The device of the logical place for the acquisition control that above-described embodiment is provided is obtaining the logic of control
, can be as needed and by above-mentioned work(only with the division progress of above-mentioned each functional module for example, in practical application during position
It can distribute and be completed by different functional modules, i.e., the internal structure of device is divided into different functional modules, more than completion
The all or part of function of description.In addition, the device of the logical place for the acquisition control that above-described embodiment is provided is controlled with obtaining
The embodiment of the method for the logical place of part belongs to same design, and it implements process and refers to embodiment of the method, no longer goes to live in the household of one's in-laws on getting married here
State.
The embodiments of the present invention are for illustration only, and the quality of embodiment is not represented.
All or part of step in the embodiment of the present invention, it is possible to use software realizes that corresponding software program can be deposited
Storage is in the storage medium that can be read, such as CD or hard disk.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.
Claims (6)
1. a kind of method for the logical place for obtaining control, it is characterised in that methods described includes:
Control in the interface of advance perform script traversal measurand obtains the control information of the control in the interface, described
Control information includes the level of control;
It is better than the principle of control arrangement at the same level according to the ascending order of control number of levels and child control, described in obtaining
Control information is stored in one file;
Sequentially read the control information of the control in the interface from the file, and successively using the control information of reading as
Current control information, circulation performs following steps, is finished until the control information in the file is read, to set up the boundary
The annexation between control in face:Judging corresponding current control according to the current control information, whether level is 1;
If it is, determining that the current control is root control;If it is not, then searching level in the control information read than described
The nearest control of level small 1 and position of current control, father's control of the control found as the current control is set up
Annexation;
Generated according to the annexation in the tree structure of the control in the interface, the tree structure and show each
The unique mark of control;
When obtaining the logical place of control to be measured in the interface, patrolling for the control to be measured is obtained according to the tree structure
Collect position.
2. according to the method described in claim 1, it is characterised in that the control in the interface is generated according to the annexation
Tree structure, including:
According to the annexation, ActiveX drafting at the same level is better than according to the ascending order of control number of levels and child control
Principle, draws the tree structure of the control in the interface.
3. according to the method described in claim 1, it is characterised in that patrolling for the control to be measured is obtained according to the tree structure
After volume position, in addition to:
Root control is determined to the path of the control to be measured according to the logical place of the control to be measured, for described tested
The test script of the control to be measured writes when object is tested.
4. a kind of device for the logical place for obtaining control, it is characterised in that described device includes:
Relating module, the control information of the control in interface for obtaining measurand, institute is set up according to the control information
The annexation between the control in interface is stated, the control information includes the level of control;
Generation module, the annexation for being set up according to the relating module generates the tree-like knot of the control in the interface
The unique mark of each control is shown in structure, the tree structure;
First acquisition module, for when obtaining the logical place of control to be measured in the interface, being given birth to according to the generation module
Into tree structure obtain the logical place of the control to be measured;
Wherein, described device also includes:
Second acquisition module, the control traveled through for advance perform script in the interface obtains the control of the control in the interface
Part information;
Memory module, the principle for being better than control arrangement at the same level according to the ascending order of control number of levels and child control,
The control information storage that second acquisition module is obtained is in one file;
The relating module includes:Cycling element, judging unit, the first associative cell and the second associative cell;
The cycling element, the control information for sequentially reading the control in the interface from the file, and successively will
The control information of reading is used as current control information, the circulation triggering judging unit, the first associative cell and the second association
Unit, is finished until the control information in the file is read:
The judging unit, for judging corresponding current control according to the current control information, whether level is 1;
First associative cell, for judging the corresponding current control level of current control information when the judging unit
For 1 when, determine the current control be root control;
Second associative cell, for judging the corresponding current control level of current control information when the judging unit
When being not 1, level smaller than the level of the current control 1 and the nearest control in position are searched in the control information read,
Father's control of the control found as the current control is established a connection.
5. device according to claim 4, it is characterised in that the generation module is used for, according to the annexation, is pressed
It is better than the principle of ActiveX drafting at the same level according to the ascending order of control number of levels and child control, draws the control in the interface
The tree structure of part.
6. device according to claim 4, it is characterised in that first acquisition module is additionally operable to, according to described tree-like
Structure is obtained after the logical place of the control to be measured, determines root control to described according to the logical place of the control to be measured
The path of control to be measured, the test script of the control to be measured writes during for testing the measurand.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210180795.XA CN103455414B (en) | 2012-06-04 | 2012-06-04 | Obtain the method and device of the logical place of control |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210180795.XA CN103455414B (en) | 2012-06-04 | 2012-06-04 | Obtain the method and device of the logical place of control |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103455414A CN103455414A (en) | 2013-12-18 |
CN103455414B true CN103455414B (en) | 2017-08-01 |
Family
ID=49737814
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210180795.XA Active CN103455414B (en) | 2012-06-04 | 2012-06-04 | Obtain the method and device of the logical place of control |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103455414B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104461892B (en) * | 2014-12-15 | 2018-04-03 | 北京国双科技有限公司 | Self-defined control acquisition methods and device |
CN105183291A (en) * | 2015-09-02 | 2015-12-23 | 深圳Tcl数字技术有限公司 | Method and system for extracting information in display interface |
CN108009078B (en) | 2016-11-01 | 2021-04-27 | 腾讯科技(深圳)有限公司 | Application interface traversal method, system and test equipment |
CN107085554B (en) * | 2017-04-11 | 2019-09-20 | 武汉斗鱼网络科技有限公司 | A kind of method and apparatus of addition control mark |
CN109814957B (en) * | 2017-11-20 | 2022-06-07 | 北京京东尚科信息技术有限公司 | Label adding method and device for IOS (input/output system) |
CN110737578A (en) * | 2018-07-20 | 2020-01-31 | 北京奇虎科技有限公司 | test application method and device |
CN109542440A (en) * | 2018-11-29 | 2019-03-29 | 金蝶软件(中国)有限公司 | To the operating method and device of window, computer installation and readable storage medium storing program for executing |
CN111611032B (en) * | 2019-02-25 | 2023-05-26 | 阿里巴巴集团控股有限公司 | User interface drawing level and excessive drawing detection method and device |
CN110413518B (en) * | 2019-07-17 | 2023-11-14 | 深圳证券交易所 | Control object library generation method and device and computer readable storage medium |
CN111552627A (en) * | 2020-03-16 | 2020-08-18 | 平安科技(深圳)有限公司 | User interface testing method and device, storage medium and computer equipment |
CN113971058A (en) * | 2020-07-22 | 2022-01-25 | 北京奇虎科技有限公司 | Control positioning method, device, equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101216766A (en) * | 2008-01-21 | 2008-07-09 | 中兴通讯股份有限公司 | Atom manipulation encapsulation apparatus and method |
CN101556539A (en) * | 2009-04-03 | 2009-10-14 | 腾讯科技(北京)有限公司 | Method and device for realizing tree structure based on a macos operation system |
CN101630286A (en) * | 2009-08-07 | 2010-01-20 | 金蝶软件(中国)有限公司 | Automatic testing method and automatic testing device |
-
2012
- 2012-06-04 CN CN201210180795.XA patent/CN103455414B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101216766A (en) * | 2008-01-21 | 2008-07-09 | 中兴通讯股份有限公司 | Atom manipulation encapsulation apparatus and method |
CN101556539A (en) * | 2009-04-03 | 2009-10-14 | 腾讯科技(北京)有限公司 | Method and device for realizing tree structure based on a macos operation system |
CN101630286A (en) * | 2009-08-07 | 2010-01-20 | 金蝶软件(中国)有限公司 | Automatic testing method and automatic testing device |
Non-Patent Citations (1)
Title |
---|
"基于迭代开发模型的GUI自动化测试框架的构建";沈偕荫;《中国优秀硕士学位论文全文数据库 信息科技辑》;20110315(第03期);论文第3.1.1节,第3.1.3节及图3.1 * |
Also Published As
Publication number | Publication date |
---|---|
CN103455414A (en) | 2013-12-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103455414B (en) | Obtain the method and device of the logical place of control | |
CN103309797B (en) | User interface automated testing method and device | |
CN104423961B (en) | A kind of method and system for generating test script | |
US20110252018A1 (en) | System and method for creating search index on cloud database | |
CN109308254B (en) | Test method, test device and test equipment | |
CN107729227A (en) | Application testing range determining method, system, server and storage medium | |
WO2011079685A1 (en) | Method and device for magaging regression test | |
CN103473171A (en) | Coverage rate dynamic tracking method and device based on function call paths | |
CN110515896B (en) | Model resource management method, model file manufacturing method, device and system | |
CN104461846B (en) | The method and apparatus for detecting application program power consumption | |
CN107341014A (en) | Electronic equipment, the generation method of technical documentation and device | |
CN104636349B (en) | A kind of index data compression and the method and apparatus of index data search | |
US20120265746A1 (en) | Capture, Aggregate, and Use Search Activities as a Source of Social Data Within an Enterprise | |
CN103646090A (en) | Application program recommendation method and optimization method and device for program starting speeds | |
CN105677306A (en) | Automation script compiling method and device | |
CN103365967A (en) | Automatic difference detection method and device based on crawler | |
CN110287696A (en) | A kind of detection method, device and the equipment of the shell process that rebounds | |
CN107977445A (en) | Application program recommends method and device | |
CN103019691A (en) | Transformation method for extract, transform and load (ETL) operation relation graph and implementation system thereof | |
CN104991847A (en) | Memory leakage automatic testing method and apparatus and mobile terminal | |
CN104516813A (en) | Method and device for selecting testing node of web page | |
CN106371706A (en) | Method and device for site selection of application shortcuts | |
CN105373695A (en) | Data communication method and apparatus for game servers | |
CN106156245A (en) | Line feature in a kind of electronic chart merges method and device | |
CN110245978A (en) | Policy evaluation, policy selection method and device in tactful group |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20240109 Address after: 518057 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 floors Patentee after: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. Patentee after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd. Address before: 2 East 403 room, SEG science and technology garden, Futian District, Guangdong, Shenzhen 518000, China Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. |