CN107861779A - Page object localization method and device, storage medium, electronic equipment - Google Patents

Page object localization method and device, storage medium, electronic equipment Download PDF

Info

Publication number
CN107861779A
CN107861779A CN201710855156.1A CN201710855156A CN107861779A CN 107861779 A CN107861779 A CN 107861779A CN 201710855156 A CN201710855156 A CN 201710855156A CN 107861779 A CN107861779 A CN 107861779A
Authority
CN
China
Prior art keywords
text
context text
control type
context
web page
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.)
Pending
Application number
CN201710855156.1A
Other languages
Chinese (zh)
Inventor
殷坤
纪勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Neusoft Corp
Original Assignee
Neusoft Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Neusoft Corp filed Critical Neusoft Corp
Priority to CN201710855156.1A priority Critical patent/CN107861779A/en
Publication of CN107861779A publication Critical patent/CN107861779A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

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)
  • Document Processing Apparatus (AREA)

Abstract

This disclosure relates to a kind of page object localization method and device, storage medium, electronic equipment.Methods described includes:The positioning mark of object to be positioned is obtained, the positioning identifies context text corresponding to the control type for including the object to be positioned and the object to be positioned;Using the context text, full-text search is carried out in Web page;After the context text is navigated in the Web page, by the object that context text described in distance on code execution sequence is nearest and is consistent with the control type, it is defined as the object to be positioned.Such scheme, help fast and effectively to realize being accurately positioned for object.

Description

Page object localization method and device, storage medium, electronic equipment
Technical field
This disclosure relates to page technical field of measurement and test, in particular it relates to a kind of page object localization method and device, calculating Machine readable storage medium storing program for executing, electronic equipment.
Background technology
With the continuous development of information technology, automatization testing technique becomes increasingly popular.Carrying out Web system automatic test When, each element in webpage can be considered as object one by one, first carry out object positioning, object is carried out again after finding object Operation, that is to say, that how accurately to carry out the primary premise that object positioning is automatic test.
At present, object positioning is carried out by positioning to identify mostly, it can be object ID generally to position mark, if object does not have There is the ID between ID or different objects to repeat, can be combined with object style CSS (English:Cascading Style Sheets, Chinese:CSS), relative path etc. carry out object positioning.
Such positioning method so that positioning mark is too high with the source code degree of coupling of the page, particularly in current big portion absolutely In the case that subsystem is all based on UI frameworks/UI class libraries exploitation, page interaction is more and more, page code amount is increasing, leads Existing positioning method is caused problems with occur:
1. page DOM structure is extremely complex, cause the complexity of automatic test script it is increasing, it is readable increasingly Difference, later maintenance workload is huge, or even script can not come into force from the beginning.
2. object ID is typically what framework automatically generated, and object ID may cause with page furbishing real-time change Test script is invalid.
3.UI frameworks/UI class libraries upgrading may result in page DOM structure and change, and this change also makes test script Invalid risk becomes big.
In summary, existing object positioning method is more and more poorly efficient, in some instances it may even be possible to invalid.
The content of the invention
The purpose of the disclosure is to provide a kind of page object localization method and device, computer-readable recording medium and electronics Equipment, help fast and effectively to realize being accurately positioned for object.
To achieve these goals, in a first aspect, the disclosure provides a kind of page object localization method, including:
Obtain object to be positioned positioning mark, it is described positioning mark include the object to be positioned control type and Context text corresponding to the object to be positioned;
Using the context text, full-text search is carried out in Web page;
After the context text is navigated in the Web page, by context described in distance on code execution sequence Text recently and the object that is consistent with the control type, is defined as the object to be positioned.
Alternatively, there are at least two identical context texts in the Web page, then the positioning mark also includes institute The index mark of context text corresponding to object to be positioned is stated,
It is described to utilize the context text, full-text search is carried out in Web page, including:
Using the context text and the index mark, full-text search is carried out in the Web page.
Alternatively, close the position that the positioning mark is also included between the object to be positioned and the context text System,
It is described by context text described in distance on code execution sequence recently and pair that is consistent with the control type As, it is defined as the object to be positioned, including:
If the position relationship represents that before the object to be positioned, code is performed for the context text Sequentially apart from the rearmounted node that the context text is nearest and is consistent with the control type, it is defined as described to be positioned Object;
Or
If the position relationship represents that behind the object to be positioned, code is performed for the context text Sequentially apart from the preposition node that the context text is nearest and is consistent with the control type, it is defined as described to be positioned Object.
Alternatively, have in the Web page there is provided the object for hiding attribute, then it is described by distance on code execution sequence The context text recently and the object that is consistent with the control type, is defined as the object to be positioned, including:
Pair for judging that context text described in distance is nearest on the code execution sequence and being consistent with the control type As, if there is provided hiding attribute;
If being not provided with hiding attribute, the object is defined as the object to be positioned.
Alternatively, methods described also includes:
If there is provided attribute is hidden, continue to carry out object positioning in the Web page, by code execution sequence The object for being not provided with hiding attribute being consistent recently and with the control type apart from the context text, is defined as described Object to be positioned.
Second aspect, the disclosure provide a kind of page object positioner, and described device includes:
Identifier acquisition module is positioned, the positioning for obtaining object to be positioned identifies, and the positioning mark includes described treat Context text corresponding to the control type and the object to be positioned of positioning object;
Text retrieval module, for utilizing the context text, full-text search is carried out in Web page;
Object determining module, after the context text is navigated in the Web page, by code execution sequence On apart from the context text recently and the object that is consistent with the control type, be defined as the object to be positioned.
Alternatively, there are at least two identical context texts in the Web page, then
The positioning identifier acquisition module, the positioning for obtaining object to be positioned identify, and the positioning mark includes institute State the control type of object to be positioned, the rope of context text and the context text corresponding to the object to be positioned Tendering is known;
The text retrieval module, for being identified using the context text and the index, in the Web page Middle carry out full-text search.
Alternatively, the positioning identifier acquisition module, the positioning for obtaining object to be positioned identify, the positioning mark Control type including the object to be positioned, context text corresponding to the object to be positioned and described to be positioned right As the position relationship between the context text,
The object determining module, for representing the context text in the object to be positioned in the position relationship Before when, by context text described in distance on code execution sequence recently and the rearmounted section that is consistent with the control type Point, it is defined as the object to be positioned;Or represent the context text in the object to be positioned in the position relationship Behind when, by context text described in distance on code execution sequence recently and the preposition section that is consistent with the control type Point, it is defined as the object to be positioned.
Alternatively, there is the object for being provided with and hiding attribute in the Web page, then
The object determining module, for judging on the code execution sequence context text described in distance recently and The object being consistent with the control type, if there is provided hiding attribute;It is if being not provided with hiding attribute, the object is true It is set to the object to be positioned.
Alternatively, the object determining module, it is additionally operable to, there is provided during hiding attribute, continue in the Web page Carry out object positioning, by context text described in distance on code execution sequence recently and be consistent not with the control type The object for hiding attribute is set, is defined as the object to be positioned.
The third aspect, the disclosure provide a kind of computer-readable recording medium, are stored thereon with computer program, the program The step of method any one of first aspect is realized when being executed by processor.
Fourth aspect, the disclosure provide a kind of electronic equipment, including:
Computer-readable recording medium described in the third aspect;And
One or more processor, for performing the program in the computer-readable recording medium.
In disclosure scheme, the positioning mark of object to be positioned can include the control type, to be positioned of object to be positioned Context text corresponding to object.When carrying out object positioning, text retrieval technique can be first based on, is positioned in Web page To context text, so by code execution sequence apart from context text object that is nearest, and being consistent with control type, really It is set to object to be positioned, realizes that object positions.Such scheme, help fast and effectively to realize being accurately positioned for object.
Other feature and advantage of the disclosure will be described in detail in subsequent specific embodiment part.
Brief description of the drawings
Accompanying drawing is for providing further understanding of the disclosure, and a part for constitution instruction, with following tool Body embodiment is used to explain the disclosure together, but does not form the limitation to the disclosure.In the accompanying drawings:
Fig. 1 is the schematic flow sheet of disclosure page object localization method;
Fig. 2 is the schematic diagram of Web page in the disclosure;
Fig. 3 is the structural representation of disclosure page object positioner;
Fig. 4 is the structured flowchart for the electronic equipment that the disclosure is used for page object positioning.
Embodiment
The embodiment of the disclosure is described in detail below in conjunction with accompanying drawing.It should be appreciated that this place is retouched The embodiment stated is merely to illustrate and explained the disclosure, is not limited to the disclosure.
Referring to Fig. 1, the schematic flow sheet of disclosure page object localization method is shown.This method can include following step Suddenly:
Step 101, the positioning mark of object to be positioned is obtained, the positioning mark includes the control of the object to be positioned Context text corresponding to type and the object to be positioned.
Understand that whether Web system is upgraded, or page data is maintained renewal, also either with reference to practical application UI frameworks/UI class libraries upgrading, for object, context text corresponding to the control type and object of object, it is typically It will not change.The page as shown in Figure 2, the control type of object 1 are always " input frame/input ", before object 1 Context text is always " project name ".
Based on this, disclosure scheme provides the side that a kind of combination control type and context text carry out object positioning Case.That is, the positioning mark of object can be presented as in disclosure scheme:The control type of object to be positioned, object to be positioned Corresponding context text.
For the page shown in Fig. 2, the test script realized based on disclosure scheme can be presented as:
This is directed to, when automatic test positions object 1, the control type of object 1 can be obtained from test script " input ", context text " project name ".
As a kind of example, the control type in disclosure scheme can at least be presented as input, select, date, Button, tree, grid etc., disclosure scheme can not be limited this, can specifically be set according to the Web system of reality.
Step 102, using the context text, full-text search is carried out in Web page.
Step 103, after the context text is navigated in the Web page, by distance institute on code execution sequence The object that context text is nearest and is consistent with the control type is stated, is defined as the object to be positioned.
After the positioning mark for obtaining object to be positioned, full text inspection can be carried out in Web page first with context text Rope, navigate to context text and then with reference to control type, navigate to object to be positioned.Specifically, code can be performed Object sequentially nearest apart from context text, and being consistent with control type, it is defined as object to be positioned.
In summary, object ID, object style and relative path are based on relative to prior art and carry out object positioning, this The object-based control type of disclosure scheme and context text realize that object positions, and help to simplify automatic test script Complexity, improve the readability of script, and then reduce later maintenance workload;In addition, using the control type of object, up and down Text carries out object positioning, additionally aids and reduces Web system upgrading, page data safeguards renewal, UI frameworks/UI class libraries upgrading Situations such as cause the invalid risk of test script.That is, disclosure scheme can effectively, quickly realize the standard of object It is determined that position.
In actual application, it is also possible to situations below occur, be explained one by one below.
(1) there are at least two identical context texts in Web page.
Corresponding to this, the positioning mark of object to be positioned can include:The control type of object to be positioned, object to be positioned The index mark of context text corresponding to corresponding context text, object to be positioned.That is, it can be marked by indexing Know and distinguish identical context text.
As a kind of example, in Web page, context text can be defined according to order from left to right, from top to bottom This index mark, disclosure scheme can be not specifically limited to this, accurate in Web page as long as can be identified according to index Navigate to object to be positioned for context text.
For this situation, above step 102 can be presented as:Identified using the context text and the index, Full-text search is carried out in the Web page.
It is to be appreciated that in actual application, some default rules can be preset.For example, do not wrapped in positioning mark When including index mark, default rule can be read, retrieved in Web page first context text is defined as undetermined Context text corresponding to the object of position.Disclosure scheme can be not construed as limiting to the concrete regulation of default rule, can be by practical application Depending on demand.
(2) position relationship of object to be positioned and context text is not unique in Web page.
Generally, the position relationship of object to be positioned and context text can as shown in Fig. 2 context text to be positioned right Before elephant, but it is some in particular cases, context text may also behind object to be positioned, i.e., the two position close System is not unique.Corresponding to this, in order to realize being accurately positioned for object, the positioning mark of object to be positioned can include:Treat Position the control type of object, the position corresponding to object to be positioned between context text, object to be positioned and context text Put relation.
For this situation, above step 103 can be presented as:If the position relationship represents that the context text exists Before the object to be positioned, then by context text described in distance on code execution sequence recently and with the control class The rearmounted node that type is consistent, it is defined as the object to be positioned.Or if the position relationship represents the context text Behind the object to be positioned, then by context text described in distance on code execution sequence recently and with the control The preposition node that type is consistent, it is defined as the object to be positioned.
It is to be appreciated that in actual application, some default rules can be preset.For example, do not wrapped in positioning mark When including position relationship, default rule can be read, the position relationship of the two is defined to context text in object to be positioned Above, i.e. determine object to be positioned from the rearmounted node of context text.Concrete regulation of the disclosure scheme to default rule Can be not construed as limiting, can be by practical application request depending on.
(3) there is the object for being provided with and hiding attribute in Web page.
Object in Web page, by taking input frame as an example, i.e., control type is input, may in actual application Some common labels can be utilized, plus some patterns and attribute, generate an object for appearing as input frame, but from technology It is not input frame that this is said in realization, may be arranged to hide attribute for this object.
For this situation, above step 103 can be presented as:Judge context described in distance on the code execution sequence Text is recently and the object that is consistent with the control type, if there is provided hiding attribute;If being not provided with hiding attribute, The object is defined as the object to be positioned.If there is provided attribute is hidden, continuation is carried out pair in the Web page As positioning, by context text described in distance on code execution sequence recently and being not provided with of being consistent with the control type is hidden The object of attribute is hidden, is defined as the object to be positioned.If that is, on code execution sequence apart from context text most The object closely and with control type being consistent, there is provided hiding attribute, then can continue according to literary with the context on execution sequence From the near to the remote, whether the object for sequentially judging to be consistent with the control type is provided with is hidden attribute to this distance, until determining Go out the object for being not provided with hiding attribute as object to be positioned.
With reference to Fig. 2 example showns, if object to be positioned is object 1, the position fixing process of disclosure scheme can be summarized as follows.
(1) the positioning mark of object 1 is obtained, including:Control type " input ", context text " project name ".
(2) based on context text carries out full-text search in Web page, and specific text retrieval process can refer to correlation Technology is realized, is not detailed herein.
(3) if retrieving unique consequence in Web page, the unique consequence can be defined as on corresponding to object 1 Hereafter text.If retrieving multiple results in Web page, the index mark of context text corresponding to object 1 can be obtained Know, do not include index mark in this example in positioning mark, therefore can be according to default rule, by retrieve first context text This, is defined as context text corresponding to object 1.
(4) after Web page navigates to " project name ", the specified control nearest apart from the context text can be searched The object of type, that is, search the object of input types.
It is to be appreciated that apart from context text refer to recently the two on code execution sequence it is closest.Can be with According to object 1 and the position relationship of context text, it is determined that being from the preposition node or rearmounted node of context text, determine Position object 1.Do not include position relationship in positioning mark in this example, therefore can be according to default rule, from the rearmounted of context text Object 1 is positioned in node.
In disclosure scheme, correlation technique is referred to, judges the control type of object is specified in whether being identified with positioning Control type be consistent, be not detailed herein.
(5) after the object for determining the specified control type nearest apart from context text, it can be determined that whether the object There is provided hiding attribute, object is not provided with hiding attribute in this example, therefore can be directly defined as object 1, completes object 1 Position fixing process.
It is to be appreciated that if the object of the specified control type nearest apart from context text is provided with and hides attribute, The object of next specified control type nearest apart from context text can be then continued to search for, and is hidden determined property, No longer illustrate herein.
Referring to Fig. 3, the structural representation of disclosure page object positioner is shown.Described device includes:
Identifier acquisition module 201 is positioned, the positioning for obtaining object to be positioned identifies, and the positioning mark includes described Context text corresponding to the control type of object to be positioned and the object to be positioned;
Text retrieval module 202, for utilizing the context text, full-text search is carried out in Web page;
Object determining module 203, after the context text is navigated in the Web page, code is performed Sequentially apart from the object that the context text is nearest and is consistent with the control type, it is defined as the object to be positioned.
Alternatively, there are at least two identical context texts in the Web page, then
The positioning identifier acquisition module, the positioning for obtaining object to be positioned identify, and the positioning mark includes institute State the control type of object to be positioned, the rope of context text and the context text corresponding to the object to be positioned Tendering is known;
The text retrieval module, for being identified using the context text and the index, in the Web page Middle carry out full-text search.
Alternatively, the positioning identifier acquisition module, the positioning for obtaining object to be positioned identify, the positioning mark Control type including the object to be positioned, context text corresponding to the object to be positioned and described to be positioned right As the position relationship between the context text,
The object determining module, for representing the context text in the object to be positioned in the position relationship Before when, by context text described in distance on code execution sequence recently and the rearmounted section that is consistent with the control type Point, it is defined as the object to be positioned;Or represent the context text in the object to be positioned in the position relationship Behind when, by context text described in distance on code execution sequence recently and the preposition section that is consistent with the control type Point, it is defined as the object to be positioned.
Alternatively, there is the object for being provided with and hiding attribute in the Web page, then
The object determining module, for judging on the code execution sequence context text described in distance recently and The object being consistent with the control type, if there is provided hiding attribute;It is if being not provided with hiding attribute, the object is true It is set to the object to be positioned.
Alternatively, the object determining module, it is additionally operable to, there is provided during hiding attribute, continue in the Web page Carry out object positioning, by context text described in distance on code execution sequence recently and be consistent not with the control type The object for hiding attribute is set, is defined as the object to be positioned.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Fig. 4 is the block diagram of a kind of electronic equipment 300 according to an exemplary embodiment, and the electronic equipment 300 is used for Realize that page object positions.As shown in figure 4, the electronic equipment 300 can include:Processor 301, memory 302, multimedia group Part 303, input/output (I/O) interface 304, and communication component 305.
Wherein, processor 301 is used for the integrated operation for controlling the electronic equipment 300, is determined with the page object for completing above-mentioned All or part of step in the method for position.Memory 302 is used to store various types of data to support in the electronic equipment 300 Operation, these data can for example include being used for the finger of any application program or method operated on the electronic equipment 300 Order, and the data that application program is related, such as contact data, the message of transmitting-receiving, picture, audio, video etc..The storage Device 302 can be realized by any kind of volatibility or non-volatile memory device or combinations thereof, such as static random Access memory (Static Random Access Memory, abbreviation SRAM), Electrically Erasable Read Only Memory (Electrically Erasable Programmable Read-Only Memory, abbreviation EEPROM), erasable programmable Read-only storage (Erasable Programmable Read-Only Memory, abbreviation EPROM), programmable read only memory (Programmable Read-Only Memory, abbreviation PROM), and read-only storage (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, disk or CD.Multimedia groupware 303 can include screen and audio-frequency assembly.Wherein Screen for example can be touch-screen, and audio-frequency assembly is used to export and/or input audio signal.For example, audio-frequency assembly can include One microphone, microphone are used to receive external audio signal.The audio signal received can be further stored in storage Device 302 is sent by communication component 305.Audio-frequency assembly also includes at least one loudspeaker, for exports audio signal.I/O Interface 304 provides interface between processor 301 and other interface modules, and other above-mentioned interface modules can be keyboard, mouse, Button etc..These buttons can be virtual push button or entity button.Communication component 305 is used for the electronic equipment 300 and other Wired or wireless communication is carried out between equipment.Radio communication, such as Wi-Fi, bluetooth, near-field communication (Near Field Communication, abbreviation NFC), 2G, 3G or 4G, or one or more of combinations in them, therefore the corresponding communication Component 305 can include:Wi-Fi module, bluetooth module, NFC module.
In one exemplary embodiment, electronic equipment 300 can be by one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviation ASIC), digital signal processor (Digital Signal Processor, abbreviation DSP), digital signal processing appts (Digital Signal Processing Device, Abbreviation DSPD), PLD (Programmable Logic Device, abbreviation PLD), field programmable gate array (Field Programmable Gate Array, abbreviation FPGA), controller, microcontroller, microprocessor or other electronics member Part is realized, for performing above-mentioned page object localization method.
In a further exemplary embodiment, a kind of computer-readable recording medium including programmed instruction, example are additionally provided Such as include the memory 302 of programmed instruction, said procedure instruction can be performed with completion by the processor 301 of electronic equipment 300 The page object localization method stated.
The preferred embodiment of the disclosure is described in detail above in association with accompanying drawing, still, the disclosure is not limited to above-mentioned reality The detail in mode is applied, in the range of the technology design of the disclosure, a variety of letters can be carried out to the technical scheme of the disclosure Monotropic type, these simple variants belong to the protection domain of the disclosure.
It is further to note that each particular technique feature described in above-mentioned embodiment, in not lance In the case of shield, can be combined by any suitable means, in order to avoid unnecessary repetition, the disclosure to it is various can The combination of energy no longer separately illustrates.
In addition, it can also be combined between a variety of embodiments of the disclosure, as long as it is without prejudice to originally Disclosed thought, it should equally be considered as disclosure disclosure of that.

Claims (10)

  1. A kind of 1. page object localization method, it is characterised in that including:
    Obtain the positioning mark of object to be positioned, the positioning mark includes the control type of the object to be positioned and described Context text corresponding to object to be positioned;
    Using the context text, full-text search is carried out in Web page;
    After the context text is navigated in the Web page, by context text described in distance on code execution sequence The object being consistent recently and with the control type, it is defined as the object to be positioned.
  2. 2. according to the method for claim 1, it is characterised in that have at least two identical contexts in the Web page Text, the then index that the positioning mark also includes context text corresponding to the object to be positioned identify,
    It is described to utilize the context text, full-text search is carried out in Web page, including:
    Using the context text and the index mark, full-text search is carried out in the Web page.
  3. 3. according to the method for claim 1, it is characterised in that the positioning mark also includes the object to be positioned and institute The position relationship between context text is stated,
    It is described by context text described in distance on code execution sequence recently and the object that is consistent with the control type, really It is set to the object to be positioned, including:
    If the position relationship represents the context text before the object to be positioned, by code execution sequence On apart from the context text recently and the rearmounted node that is consistent with the control type, be defined as the object to be positioned;
    Or
    If the position relationship represents the context text behind the object to be positioned, by code execution sequence On apart from the context text recently and the preposition node that is consistent with the control type, be defined as the object to be positioned.
  4. 4. according to the method for claim 1, it is characterised in that have in the Web page there is provided the object for hiding attribute, It is then described by the object that context text described in distance on code execution sequence is nearest and is consistent with the control type, it is determined that For the object to be positioned, including:
    The object for judging that context text described in distance is nearest on the code execution sequence and being consistent with the control type, Whether it is provided with and hides attribute;
    If being not provided with hiding attribute, the object is defined as the object to be positioned.
  5. 5. according to the method for claim 4, it is characterised in that methods described also includes:
    If there is provided attribute is hidden, continue to carry out object positioning in the Web page, by distance on code execution sequence The context text recently and be consistent with the control type be not provided with hide attribute object, be defined as described undetermined Position object.
  6. 6. a kind of page object positioner, it is characterised in that described device includes:
    Identifier acquisition module is positioned, the positioning for obtaining object to be positioned identifies, and the positioning mark includes described to be positioned Context text corresponding to the control type of object and the object to be positioned;
    Text retrieval module, for utilizing the context text, full-text search is carried out in Web page;
    Object determining module, after the context text is navigated in the Web page, by code execution sequence away from Object that is nearest from the context text and being consistent with the control type, is defined as the object to be positioned.
  7. 7. device according to claim 6, it is characterised in that have at least two identical contexts in the Web page Text, then
    The positioning identifier acquisition module, the positioning for obtaining object to be positioned identify, and the positioning mark includes described treat Position the control type of object, the index mark of context text and the context text corresponding to the object to be positioned Know;
    The text retrieval module, for using the context text and the index mark, entering in the Web page Row full-text search.
  8. 8. device according to claim 6, it is characterised in that
    The positioning identifier acquisition module, the positioning for obtaining object to be positioned identify, and the positioning mark includes described treat Position the control type of object, context text corresponding to the object to be positioned and the object to be positioned with it is described on The hereafter position relationship between text,
    The object determining module, for representing the context text before the object to be positioned in the position relationship During face, by context text described in distance on code execution sequence recently and the rearmounted node that is consistent with the control type, really It is set to the object to be positioned;Or represent the context text after the object to be positioned in the position relationship During face, by context text described in distance on code execution sequence recently and the preposition node that is consistent with the control type, really It is set to the object to be positioned.
  9. 9. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is held by processor The step of any one of claim 1 to 5 methods described is realized during row.
  10. 10. a kind of electronic equipment, it is characterised in that including:
    Computer-readable recording medium described in claim 9;And
    One or more processor, for performing the program in the computer-readable recording medium.
CN201710855156.1A 2017-09-20 2017-09-20 Page object localization method and device, storage medium, electronic equipment Pending CN107861779A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710855156.1A CN107861779A (en) 2017-09-20 2017-09-20 Page object localization method and device, storage medium, electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710855156.1A CN107861779A (en) 2017-09-20 2017-09-20 Page object localization method and device, storage medium, electronic equipment

Publications (1)

Publication Number Publication Date
CN107861779A true CN107861779A (en) 2018-03-30

Family

ID=61699476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710855156.1A Pending CN107861779A (en) 2017-09-20 2017-09-20 Page object localization method and device, storage medium, electronic equipment

Country Status (1)

Country Link
CN (1) CN107861779A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144871A (en) * 2018-08-17 2019-01-04 北京邮电大学 A kind of recognition methods of automatic test element and device
CN109739764A (en) * 2018-12-29 2019-05-10 中国联合网络通信集团有限公司 A kind of applied program testing method and device
CN110599028A (en) * 2019-09-09 2019-12-20 深圳前海微众银行股份有限公司 Text positioning method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103177096A (en) * 2013-03-15 2013-06-26 百度在线网络技术(北京)有限公司 Page element positioning method based on text attribute and page element positioning device based on text attribute
CN103365778A (en) * 2013-07-03 2013-10-23 北京京东尚科信息技术有限公司 Control test method and device
CN104424087A (en) * 2013-08-21 2015-03-18 阿里巴巴集团控股有限公司 Web page element positioning method, apparatus and system
US20150370688A1 (en) * 2014-06-20 2015-12-24 Vmware, Inc. Automatic updating of graphical user interface element locators based on dimension comparison

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103177096A (en) * 2013-03-15 2013-06-26 百度在线网络技术(北京)有限公司 Page element positioning method based on text attribute and page element positioning device based on text attribute
CN103365778A (en) * 2013-07-03 2013-10-23 北京京东尚科信息技术有限公司 Control test method and device
CN104424087A (en) * 2013-08-21 2015-03-18 阿里巴巴集团控股有限公司 Web page element positioning method, apparatus and system
US20150370688A1 (en) * 2014-06-20 2015-12-24 Vmware, Inc. Automatic updating of graphical user interface element locators based on dimension comparison

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144871A (en) * 2018-08-17 2019-01-04 北京邮电大学 A kind of recognition methods of automatic test element and device
CN109144871B (en) * 2018-08-17 2020-11-10 北京邮电大学 Automatic test element identification method and device
CN109739764A (en) * 2018-12-29 2019-05-10 中国联合网络通信集团有限公司 A kind of applied program testing method and device
CN110599028A (en) * 2019-09-09 2019-12-20 深圳前海微众银行股份有限公司 Text positioning method, device, equipment and storage medium
WO2021047003A1 (en) * 2019-09-09 2021-03-18 深圳前海微众银行股份有限公司 Text positioning method, apparatus, device, and storage medium
CN110599028B (en) * 2019-09-09 2022-05-17 深圳前海微众银行股份有限公司 Text positioning method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US9454964B2 (en) Interfacing device and method for supporting speech dialogue service
CN103019925B (en) Selector acquisition method and device
JP2007094818A (en) Batch copy and paste method, device and computer program for a plurality of pieces of data
JP6514084B2 (en) OPERATION SUPPORT SYSTEM, OPERATION SUPPORT METHOD, AND OPERATION SUPPORT PROGRAM
CN107861779A (en) Page object localization method and device, storage medium, electronic equipment
CN110221959B (en) Application program testing method, device and computer readable medium
US20140089841A1 (en) Device and method for providing application interface based on writing input
US9811505B2 (en) Techniques to provide processing enhancements for a text editor in a computing environment
CN102959538B (en) Index to document
EP3029567A1 (en) Method and device for updating input method system, computer storage medium, and device
WO2015043352A1 (en) Method and apparatus for selecting test nodes on webpages
CN104899203B (en) Webpage generation method and device and terminal equipment
WO2016118142A1 (en) In-line editor insertion
CN108287707A (en) JSX document generating methods, device, storage medium and computer equipment
CN106293671B (en) Method and device for generating component template
CN102147797A (en) Method and device for managing element files in content management system
WO2006046665A1 (en) Document processing device and document processing method
US9122665B2 (en) Rich formatting for a data label associated with a data point
US20180011779A1 (en) Automatically generating object locators for automation test generation
CN110378566A (en) Information checking method, equipment, storage medium and device
CN105243134A (en) Method and equipment for processing hijacked browser
CN115481025A (en) Script recording method and device for automatic test, computer equipment and medium
JP2006309377A (en) Document retrieval device, document retrieval method, its program, and recording medium
CN103309993A (en) Keyword extraction method and device
CN111859089B (en) Wrong word detection control method for Internet information

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180330