CN104866509A - Page element positioning method and device - Google Patents

Page element positioning method and device Download PDF

Info

Publication number
CN104866509A
CN104866509A CN201410066542.9A CN201410066542A CN104866509A CN 104866509 A CN104866509 A CN 104866509A CN 201410066542 A CN201410066542 A CN 201410066542A CN 104866509 A CN104866509 A CN 104866509A
Authority
CN
China
Prior art keywords
page elements
attribute
described page
path
unique
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
CN201410066542.9A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201410066542.9A priority Critical patent/CN104866509A/en
Publication of CN104866509A publication Critical patent/CN104866509A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a page element positioning method and device. According to the embodiment, a to-be-positioned page element in a target page is determined, and the path of the page element is acquired according to at least one of the generation mode of the ID (identity) attribute, the user-defined attribute and uniqueness of the CLASS attribute of the page element, so that the page element is positioned. A DOM (document object model) tree of the target page is not required to be traversed step by step, and the path of the page element can be obtained, so that the problem that the acquired path of the page element is too long due to the fact that the page element is positioned through step-by-step traversal of the DOM tree of the page in the prior art can be solved, and the page element positioning efficiency is improved.

Description

The localization method of page elements and device
[technical field]
The application relates to WWW (World Wide Web, Web) page treatment technology, particularly relates to a kind of localization method and device of page elements.
[background technology]
Along with the development of the communication technology, terminal is integrated with increasing function, thus make to contain more and more corresponding application program in the systemic-function list of terminal, such as, the application program (Application, APP) etc. of installing in the application program of installing in computer, third party's smart mobile phone.Can relate to some pages in some application program, these pages are the webpages (Web Page) write based on HTML (Hypertext Markup Language) (HyperText MarkupLanguage, HTML), also can be called Web page.Web page can comprise by one or more page-tag and HTML (Hypertext Markup Language) (HyperTextMarkup Language, HTML) a display block of label composition, be called page elements, such as, word, label, hyperlink, button, input frame, combobox etc.In some cases, need location specified page element, such as, in user interface (User interface, UI) test, need to operate etc. specified page element.In prior art, by traveling through DOM Document Object Model (Document Object Model, the DOM) tree of the page step by step, the path of specified page element can be obtained.
But, due to the location adopting the mode traveling through the dom tree of the page step by step to carry out page elements, the path of obtained page elements is made to be the All Paths of this page elements to the root node of dom tree, therefore, the path of this page elements is very tediously long, thus result in the reduction of the efficiency of page elements location.
[summary of the invention]
The many aspects of the application provide a kind of localization method and device of page elements, in order to improve the efficiency of page elements location.
The one side of the application, provides a kind of localization method of page elements, comprising:
Determine page elements to be positioned in target pages;
According at least one item in the uniqueness of the CLASS attribute of the generating mode of the ID attribute of described page elements, the Custom Attributes of described page elements and described page elements, obtain the path of described page elements; Wherein,
Described Custom Attributes comprises other attributes except ID attribute and CLASS attribute.
Aspect as above and arbitrary possible implementation, a kind of implementation is provided further, at least one item in the uniqueness of the generating mode of the described ID attribute according to described page elements, the Custom Attributes of described page elements and the CLASS attribute of described page elements, obtain the path of described page elements, comprising:
If described page elements comprises ID attribute, and in the ID attribute of described page elements, do not comprise the character of dynamic change, by the ID attribute of described page elements, as the path of described page elements;
If described page elements comprises ID attribute, and in the ID attribute of described page elements, comprise the character of dynamic change, by the part in the ID attribute of described page elements except the character of described dynamic change, as the path of described page elements.
Aspect as above and arbitrary possible implementation, a kind of implementation is provided further, at least one item in the uniqueness of the generating mode of the described ID attribute according to described page elements, the Custom Attributes of described page elements and the CLASS attribute of described page elements, obtain the path of described page elements, comprising:
If described page elements does not comprise ID attribute, and described page elements comprises unique Custom Attributes, by described Custom Attributes, as the path of described page elements.
Aspect as above and arbitrary possible implementation, a kind of implementation is provided further, at least one item in the uniqueness of the generating mode of the described ID attribute according to described page elements, the Custom Attributes of described page elements and the CLASS attribute of described page elements, obtain the path of described page elements, comprising:
If described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises unique CLASS attribute, by described unique CLASS attribute, as the path of described page elements;
If described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises not unique CLASS attribute or does not comprise CLASS attribute,
The upper level page elements of described page elements is obtained in described target pages, described upper level page elements comprises ID attribute or unique CLASS attribute, by the ID attribute of described upper level page elements or unique CLASS attribute, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements; Or
At least two higher level's page elements of described page elements are obtained in described target pages, in described at least two higher level's page elements, five-star higher level's page elements comprises ID attribute or unique CLASS attribute, other higher level's page elements in described at least two higher level's page elements except described five-star higher level's page elements do not comprise ID attribute or unique CLASS attribute, by the ID attribute of described five-star higher level's page elements or unique CLASS attribute, the page-tag of other higher level's page elements described, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, if described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises not unique CLASS attribute or do not comprise CLASS attribute;
The upper level page elements of described page elements is obtained in described target pages;
If described upper level page elements comprises ID attribute or unique CLASS attribute, by the ID attribute of described upper level page elements or unique CLASS attribute, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements;
If described upper level page elements does not comprise ID attribute or unique CLASS attribute, obtain higher level's page elements of described upper level page elements successively, until get the higher level's page elements comprising ID attribute or unique CLASS attribute, by the page-tag of the ID attribute of this higher level's page elements or unique CLASS attribute, other higher level's page elements described, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements.
Aspect as above and arbitrary possible implementation, a kind of implementation is provided further, at least one item in the uniqueness of the generating mode of the described ID attribute according to described page elements, the Custom Attributes of described page elements and the CLASS attribute of described page elements, after obtaining the path of described page elements, also comprise:
Corresponding relation between the element information setting up described target pages and described page elements; Wherein, described element information comprises the attribute of name of described page elements and the path of described page elements.
The another aspect of the application, provides a kind of locating device of page elements, comprising:
Determining unit, for determining page elements to be positioned in target pages;
Positioning unit, at least one item in the uniqueness of the CLASS attribute of the generating mode of the ID attribute according to described page elements, the Custom Attributes of described page elements and described page elements, obtains the path of described page elements; Wherein,
Described Custom Attributes comprises other attributes except ID attribute and CLASS attribute.
Aspect as above and arbitrary possible implementation, provide a kind of implementation, described positioning unit further, specifically for
If described page elements comprises ID attribute, and in the ID attribute of described page elements, do not comprise the character of dynamic change, by the ID attribute of described page elements, as the path of described page elements;
If described page elements comprises ID attribute, and in the ID attribute of described page elements, comprise the character of dynamic change, by the part in the ID attribute of described page elements except the character of described dynamic change, as the path of described page elements.
Aspect as above and arbitrary possible implementation, provide a kind of implementation, described positioning unit further, specifically for
If described page elements does not comprise ID attribute, and described page elements comprises unique Custom Attributes, by described Custom Attributes, as the path of described page elements.
Aspect as above and arbitrary possible implementation, provide a kind of implementation, described positioning unit further, specifically for
If described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises unique CLASS attribute, by described unique CLASS attribute, as the path of described page elements;
If described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises not unique CLASS attribute or does not comprise CLASS attribute,
The upper level page elements of described page elements is obtained in described target pages, described upper level page elements comprises ID attribute or unique CLASS attribute, by the ID attribute of described upper level page elements or unique CLASS attribute, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements; Or
At least two higher level's page elements of described page elements are obtained in described target pages, in described at least two higher level's page elements, five-star higher level's page elements comprises ID attribute or unique CLASS attribute, other higher level's page elements in described at least two higher level's page elements except described five-star higher level's page elements do not comprise ID attribute or unique CLASS attribute, by the ID attribute of described five-star higher level's page elements or unique CLASS attribute, the page-tag of other higher level's page elements described, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, if described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises not unique CLASS attribute or do not comprise CLASS attribute; Described positioning unit, specifically for
The upper level page elements of described page elements is obtained in described target pages;
If described upper level page elements comprises ID attribute or unique CLASS attribute, by the ID attribute of described upper level page elements or unique CLASS attribute, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements;
If described upper level page elements does not comprise ID attribute or unique CLASS attribute, obtain higher level's page elements of described upper level page elements successively, until get the higher level's page elements comprising ID attribute or unique CLASS attribute, by the page-tag of the ID attribute of this higher level's page elements or unique CLASS attribute, other higher level's page elements described, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, and described device also comprises sets up unit, for
Corresponding relation between the element information setting up described target pages and described page elements; Wherein, described element information comprises the attribute of name of described page elements and the path of described page elements.
As shown from the above technical solution, the embodiment of the present application is by determining page elements to be positioned in target pages, and then the generating mode of ID attribute according to described page elements, at least one item in the uniqueness of the Custom Attributes of described page elements and the CLASS attribute of described page elements, obtain the path of described page elements, make it possible to the location realizing page elements, due to the dom tree without the need to traveling through target pages step by step, the path of page elements can be obtained, therefore, can avoid in prior art owing to adopting the mode traveling through the dom tree of the page step by step to carry out the location of page elements and the very tediously long problem in the path of the page elements obtained that causes, thus improve the efficiency of page elements location.
In addition, adopt the technical scheme that the application provides, can according at least one item in the uniqueness of the CLASS attribute of the Custom Attributes of the generating mode of the ID attribute of described page elements, described page elements and described page elements, obtain the path of described page elements, thus improve dirigibility and the reliability of page elements location.
In addition, adopt the technical scheme that the application provides, no longer rely on the dom tree of target pages, the path of page elements can be obtained, the problem of the acquisition failure in the path of the page elements caused because the dom tree of target pages changes in prior art can be avoided, thus improve the reliability of page elements location.
[accompanying drawing explanation]
In order to be illustrated more clearly in the technical scheme in the embodiment of the present application, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the application, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The schematic flow sheet of the localization method of the page elements that Fig. 1 provides for the application one embodiment;
The structural representation of the locating device of the page elements that Fig. 2 provides for another embodiment of the application;
The structural representation of the locating device of the page elements that Fig. 3 provides for another embodiment of the application.
[embodiment]
For making the object of the embodiment of the present application, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present application, technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is some embodiments of the present application, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making other embodiments whole obtained under creative work prerequisite, all belong to the scope of the application's protection.
It should be noted that, terminal involved in the embodiment of the present application can include but not limited to mobile phone, personal digital assistant (Personal Digital Assistant, PDA), radio hand-held equipment, panel computer (Tablet Computer), PC (Personal Computer, PC), MP3 player, MP4 player etc.
In addition, term "and/or" herein, being only a kind of incidence relation describing affiliated partner, can there are three kinds of relations in expression, and such as, A and/or B, can represent: individualism A, exists A and B simultaneously, these three kinds of situations of individualism B.In addition, character "/" herein, general expression forward-backward correlation is to the relation liking a kind of "or".
The schematic flow sheet of the localization method of the page elements that Fig. 1 provides for the application one embodiment, as shown in Figure 1.
101, page elements to be positioned in target pages is determined.
Particularly, described page elements can include but not limited to following at least one item: word, label, hyperlink, button, input frame and combobox, the present embodiment does not limit this.This page elements is exactly the page elements needing location.
Alternatively, in one of the present embodiment possible implementation, in 101, the mouse event of the page elements in target pages can specifically be monitored.If there is mouse to move into (hover) event, then can obtain this page-tag corresponding to mouse immigration event, and then then according to page-tag, page elements to be positioned can be determined.
Be understandable that, after obtaining this page-tag corresponding to mouse immigration event, need to judge whether the page-tag obtained is HTML root label.If the page-tag obtained is HTML root label and <html> ... </html>, then continue the mouse event of the page elements monitored in target pages; If the page-tag obtained not is HTML root label, then according to page-tag, page elements to be positioned can be determined.
102, according at least one item in the uniqueness of class (CLASS) attribute of the generating mode of mark (Identity, the ID) attribute of described page elements, the Custom Attributes of described page elements and described page elements, the path of described page elements is obtained.
Wherein,
The ID attribute of page elements, for unique identification page elements.The generating mode of ID attribute can include but not limited to static generation and dynamically generation, and the present embodiment is not particularly limited this.In the ID attribute adopting the static mode generated to generate, comprise changeless character; In the ID attribute adopting the mode dynamically generated to generate, except comprising changeless character, also can comprise the character of dynamic change, such as, numeral 0 ~ 9, or, more such as, special symbol # or * etc.
Custom Attributes, comprises other attributes except ID attribute and CLASS attribute, and such as, title (NAME) attribute, value (VALUE) attribute or title (TITLE) attribute etc., the present embodiment is not particularly limited this.
The CLASS attribute of page elements, for specifying the class name (ClassName) of page elements.
Be understandable that, the page involved by the application, can be the webpage (Web Page) write based on HTML (Hypertext Markup Language) (HyperText Markup Language, HTML), also can be called Web page.
It should be noted that, the executive agent of 101 and 102 can be locating device, and can be arranged in local client, to carry out off-line location, or can also be arranged in the server of network side, to carry out tuning on-line, the present embodiment is not particularly limited this.
Be understandable that, described client can be mounted in the application program in terminal, or can also be browser, locating device can be then a plug-in unit of browser, as long as page elements location can be realized, with realize this page elements path obtain outwardness form can, the present embodiment does not limit this.
The technical scheme adopting the present embodiment to provide, not carrying out traversing operation step by step to the dom tree of target pages, can obtain the path of page elements, causing without the need to obtaining the All Paths of this page elements to the root node of dom tree, as the path of page elements.
Like this, by determining page elements to be positioned in target pages, and then the generating mode of ID attribute according to described page elements, at least one item in the uniqueness of the Custom Attributes of described page elements and the CLASS attribute of described page elements, obtain the path of described page elements, make it possible to the location realizing page elements, due to the dom tree without the need to traveling through target pages step by step, the path of page elements can be obtained, therefore, can avoid in prior art owing to adopting the mode traveling through the dom tree of the page step by step to carry out the location of page elements and the very tediously long problem in the path of the page elements obtained that causes, thus improve the efficiency of page elements location.
Alternatively, in one of the present embodiment possible implementation, in 102, specifically can judge whether described page elements comprises ID attribute, if comprise ID attribute, and then in the ID attribute that then can judge described page elements again, whether comprise the character of dynamic change.
Such as, if described page elements comprises ID attribute, and in the ID attribute of described page elements, do not comprise the character of dynamic change, by the ID attribute of described page elements, as the path of described page elements.If page-tag is following form
<div class="parent">
<div id="child"></div>
</div>
So, the path of the page elements of this page-tag composition can be then #child, can also write the forms such as div [id=" child "], represents that ID attribute is the page elements of child.
Or, again such as, if described page elements comprises ID attribute, and in the ID attribute of described page elements, comprise the character of dynamic change, by the part in the ID attribute of described page elements except the character of described dynamic change, as the path of described page elements.Particularly, specifically can adopt canonical matching way, the character of dynamic change described in the ID attribute filtering out described page elements, by the part in the ID attribute of described page elements except the character of described dynamic change, as the path of described page elements.If page-tag is following form
<input type="text"size="10"name="provideProducts2"value=""class="input-text"id="yui-gen8">
So, the path of the page elements of this page-tag composition can be then input [id^=yui-gen], and in representation page element, label is input, and its ID attribute starts with yui-gen.
Alternatively, in one of the present embodiment possible implementation, in 102, specifically can judge whether described page elements comprises ID attribute, if described page elements does not comprise ID attribute, and then then can judge whether described page elements comprises unique Custom Attributes again, i.e. the Custom Attributes of a unique identification page elements.
Such as, if described page elements does not comprise ID attribute, and described page elements comprises unique Custom Attributes, by described Custom Attributes, as the path of described page elements.If page-tag is following form
<input type="text"data-value="company-name">
So, the path of the page elements of this page-tag composition can be then input [data-value=" company-name "].
Alternatively, in one of the present embodiment possible implementation, in 102, specifically can judge whether described page elements comprises ID attribute, if described page elements does not comprise ID attribute, and then then can judge whether described page elements comprises unique Custom Attributes again, if described page elements does not comprise unique Custom Attributes, namely comprise not unique Custom Attributes or do not comprise Custom Attributes, then can judge whether described page elements comprises CLASS attribute, if described page elements comprises CLASS attribute, judge that whether described CLASS attribute is unique again.
Such as, if described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises unique CLASS attribute, i.e. the CLASS attribute of a unique identification page elements, by described unique CLASS attribute, as the path of described page elements.If page-tag is following form
<div class="company-name">…</div>
So, the path of the page elements of this page-tag composition can be then div [class=" company-name "].
Or, again such as, if described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises not unique CLASS attribute or does not comprise CLASS attribute, the upper level page elements of described page elements is obtained in described target pages, described upper level page elements comprises ID attribute or unique CLASS attribute, by the ID attribute of described upper level page elements or unique CLASS attribute, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements.If page-tag is following form
So, the path of page elements that this page-tag A forms can be then the path of div [id=" search-content "] div [class=" span "], page-tag a is div [id=" search-content "] div [class=" span "] a.
Or, again such as, if described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises not unique CLASS attribute or does not comprise CLASS attribute, at least two higher level's page elements of described page elements are obtained in described target pages, in described at least two higher level's page elements, five-star higher level's page elements comprises ID attribute or unique CLASS attribute, other higher level's page elements in described at least two higher level's page elements except described five-star higher level's page elements do not comprise ID attribute or unique CLASS attribute, by the ID attribute of described five-star higher level's page elements or unique CLASS attribute, the page-tag of other higher level's page elements described, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements.If page-tag is following form
So, the path of page elements that this page-tag a forms can be then div [id=" search-content "] div [class=" span "] div a.
Particularly, the upper level page elements of described page elements specifically can be obtained in described target pages.If described upper level page elements comprises ID attribute or unique CLASS attribute, by the ID attribute of described upper level page elements or unique CLASS attribute, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements; If described upper level page elements does not comprise ID attribute or unique CLASS attribute, obtain higher level's page elements of described upper level page elements successively, until get the higher level's page elements comprising ID attribute or unique CLASS attribute, by the page-tag of the ID attribute of this higher level's page elements or unique CLASS attribute, other higher level's page elements described, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements.
It should be noted that, if page elements, such as, higher level's page elements of upper level page elements or upper level page elements comprises ID attribute, the character whether comprising dynamic change in the ID attribute of described page elements can also be judged further again, thus determine how described ID attribute becomes the part in the path of described page elements.
Such as, if do not comprise the character of dynamic change in the ID attribute of described page elements, by the ID attribute of described page elements, as the part in the path of described page elements.
Or, more such as, if comprise the character of dynamic change in the ID attribute of described page elements, by the part in the ID attribute of described page elements except the character of described dynamic change, as the part in the path of described page elements.Particularly, specifically can adopt canonical matching way, except the character of described dynamic change in the ID attribute of described page elements, by the part in the ID attribute of described page elements except the character of described dynamic change, as the part in the path of described page elements.
Alternatively, in one of the present embodiment possible implementation, after 102, the corresponding relation between the element information can also setting up described target pages and described page elements further; Wherein, described element information comprises the attribute of name of described page elements and the path of described page elements.
Particularly, specifically can call such as by remote interface, ajax far call, by name (NAME) property store of the path of obtained page elements and this page elements in a database, and be associated with described target pages.Wherein, the data layout of interface can adopt but be not limited to json(JavaScriptObject Notation) form etc.In UI test process, UI script can according to the URL(uniform resource locator) of target pages (Uniform Resource Locator, URL), obtain the element information of all page elements in described target pages, and then according to the attribute of name of specified page element, obtain the path of this page elements.
Like this, if the path of page elements changes, the technical scheme that the application provides can be adopted, obtain the path after the change of page elements, the path comprised in the element information of direct this page elements of renewal, without the need to revising UI script, thus reduce the maintenance cost of UI script.
In the present embodiment, by determining page elements to be positioned in target pages, and then the generating mode of ID attribute according to described page elements, at least one item in the uniqueness of the Custom Attributes of described page elements and the CLASS attribute of described page elements, obtain the path of described page elements, make it possible to the location realizing page elements, due to the dom tree without the need to traveling through target pages step by step, the path of page elements can be obtained, therefore, can avoid in prior art owing to adopting the mode traveling through the dom tree of the page step by step to carry out the location of page elements and the very tediously long problem in the path of the page elements obtained that causes, thus improve the efficiency of page elements location.
In addition, adopt the technical scheme that the application provides, can according at least one item in the uniqueness of the CLASS attribute of the Custom Attributes of the generating mode of the ID attribute of described page elements, described page elements and described page elements, obtain the path of described page elements, thus improve dirigibility and the reliability of page elements location.
In addition, adopt the technical scheme that the application provides, no longer rely on the dom tree of target pages, the path of page elements can be obtained, the problem of the acquisition failure in the path of the page elements caused because the dom tree of target pages changes in prior art can be avoided, thus improve the reliability of page elements location.
It should be noted that, for aforesaid each embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the application is not by the restriction of described sequence of movement, because according to the application, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and involved action and module might not be that the application is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
The structural representation of the locating device of the page elements that Fig. 2 provides for another embodiment of the application, as shown in Figure 2.The locating device of the page elements of the present embodiment can comprise determining unit 21 and positioning unit 22.
Described determining unit 21, for determining page elements to be positioned in target pages.
Particularly, described page elements can include but not limited to following at least one item: word, label, hyperlink, button, input frame and combobox, the present embodiment does not limit this.This page elements is exactly the page elements needing location.
Alternatively, in one of the present embodiment possible implementation, described determining unit 21 specifically can monitor the mouse event of the page elements in target pages.If there is mouse to move into (hover) event, then can obtain this page-tag corresponding to mouse immigration event, and then then according to page-tag, page elements to be positioned can be determined.
Be understandable that, after described determining unit 21 obtains this page-tag corresponding to mouse immigration event, need to judge whether the page-tag obtained is HTML root label.If the page-tag obtained is HTML root label and <html> ... </html>, then continue the mouse event of the page elements monitored in target pages; If the page-tag obtained not is HTML root label, then according to page-tag, page elements to be positioned can be determined.
Described positioning unit 22, at least one item in the uniqueness of the CLASS attribute of the generating mode of the ID attribute according to described page elements, the Custom Attributes of described page elements and described page elements, obtains the path of described page elements.
Wherein,
The ID attribute of page elements, for unique identification page elements.The generating mode of ID attribute can include but not limited to static generation and dynamically generation, and the present embodiment is not particularly limited this.In the ID attribute adopting the static mode generated to generate, comprise changeless character; In the ID attribute adopting the mode dynamically generated to generate, except comprising changeless character, also can comprise the character of dynamic change, such as, numeral 0 ~ 9, or, more such as, special symbol # or * etc.
Custom Attributes, comprises other attributes except ID attribute and CLASS attribute, and such as, title (NAME) attribute, value (VALUE) attribute or title (TITLE) attribute etc., the present embodiment is not particularly limited this.
The CLASS attribute of page elements, for specifying the class name (ClassName) of page elements.
Be understandable that, the page involved by the application, can be the webpage (Web Page) write based on HTML (Hypertext Markup Language) (HyperText Markup Language, HTML), also can be called Web page.
It should be noted that, the locating device of the page elements that the present embodiment provides, can be arranged in local client, to carry out off-line location, or can also be arranged in the server of network side, to carry out tuning on-line, the present embodiment is not particularly limited this.
Be understandable that, described client can be mounted in the application program in terminal, or can also be browser, locating device can be then a plug-in unit of browser, as long as page elements location can be realized, with realize this page elements path obtain outwardness form can, the present embodiment does not limit this.
The technical scheme adopting the present embodiment to provide, not carrying out traversing operation step by step to the dom tree of target pages, can obtain the path of page elements, causing without the need to obtaining the All Paths of this page elements to the root node of dom tree, as the path of page elements.
Like this, by page elements to be positioned in determining unit determination target pages, and then by the generating mode of positioning unit according to the ID attribute of described page elements, at least one item in the uniqueness of the Custom Attributes of described page elements and the CLASS attribute of described page elements, obtain the path of described page elements, make it possible to the location realizing page elements, due to the dom tree without the need to traveling through target pages step by step, the path of page elements can be obtained, therefore, can avoid in prior art owing to adopting the mode traveling through the dom tree of the page step by step to carry out the location of page elements and the very tediously long problem in the path of the page elements obtained that causes, thus improve the efficiency of page elements location.
Alternatively, in one of the present embodiment possible implementation, described positioning unit 22, specifically can judge whether described page elements comprises ID attribute, if comprise ID attribute, and then in the ID attribute that then can judge described page elements again, whether comprise the character of dynamic change.
Such as, described positioning unit 22, if specifically may be used for described page elements to comprise ID attribute, and does not comprise the character of dynamic change in the ID attribute of described page elements, by the ID attribute of described page elements, as the path of described page elements.If page-tag is following form
<div class="parent">
<div id="child"></div>
</div>
So, the path of the page elements of this page-tag composition can be then #child, can also write the forms such as div [id=" child "], represents that ID attribute is the page elements of child.
Or, again such as, such as, described positioning unit 22, if specifically may be used for described page elements to comprise ID attribute, and comprise the character of dynamic change in the ID attribute of described page elements, by the part in the ID attribute of described page elements except the character of described dynamic change, as the path of described page elements.Particularly, described positioning unit 22 specifically can adopt canonical matching way, the character of dynamic change described in the ID attribute filtering out described page elements, by the part in the ID attribute of described page elements except the character of described dynamic change, as the path of described page elements.If page-tag is following form
<input type="text"size="10"name="provideProducts2"value=""class="input-text"id="yui-gen8">
So, the path of the page elements of this page-tag composition can be then input [id^=yui-gen], and in representation page element, label is input, and its ID attribute starts with yui-gen.
Alternatively, in one of the present embodiment possible implementation, described positioning unit 22, specifically can judge whether described page elements comprises ID attribute, if described page elements does not comprise ID attribute, and then then can judge whether described page elements comprises unique Custom Attributes again, i.e. the Custom Attributes of a unique identification page elements.
Such as, described positioning unit 22, if specifically may be used for described page elements do not comprise ID attribute, and described page elements comprises unique Custom Attributes, by described Custom Attributes, as the path of described page elements.
If page-tag is following form
<input type="text"data-value="company-name">
So, the path of the page elements of this page-tag composition can be then input [data-value=" company-name "].
Alternatively, in one of the present embodiment possible implementation, described positioning unit 22, specifically can judge whether described page elements comprises ID attribute, if described page elements does not comprise ID attribute, and then then can judge whether described page elements comprises unique Custom Attributes again, if described page elements does not comprise unique Custom Attributes, namely comprise not unique Custom Attributes or do not comprise Custom Attributes, then can judge whether described page elements comprises CLASS attribute, if described page elements comprises CLASS attribute, judge that whether described CLASS attribute is unique again.
Such as, described positioning unit 22, if specifically may be used for described page elements do not comprise ID attribute and unique Custom Attributes, and described page elements comprises unique CLASS attribute, the i.e. CLASS attribute of a unique identification page elements, by described unique CLASS attribute, as the path of described page elements.If page-tag is following form
<div class="company-name">…</div>
So, the path of the page elements of this page-tag composition can be then div [class=" company-name "].
Or, again such as, described positioning unit 22, if specifically may be used for described page elements do not comprise ID attribute and unique Custom Attributes, and described page elements comprises not unique CLASS attribute or does not comprise CLASS attribute, the upper level page elements of described page elements is obtained in described target pages, described upper level page elements comprises ID attribute or unique CLASS attribute, by the ID attribute of described upper level page elements or unique CLASS attribute, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements.If page-tag is following form
So, the path of page elements that this page-tag A forms can be then the path of div [id=" search-content "] div [class=" span "], page-tag a is div [id=" search-content "] div [class=" span "] a.
Or, again such as, described positioning unit 22, if specifically may be used for described page elements do not comprise ID attribute and unique Custom Attributes, and described page elements comprises not unique CLASS attribute or does not comprise CLASS attribute, at least two higher level's page elements of described page elements are obtained in described target pages, in described at least two higher level's page elements, five-star higher level's page elements comprises ID attribute or unique CLASS attribute, other higher level's page elements in described at least two higher level's page elements except described five-star higher level's page elements do not comprise ID attribute or unique CLASS attribute, by the ID attribute of described five-star higher level's page elements or unique CLASS attribute, the page-tag of other higher level's page elements described, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements.If page-tag is following form
So, the path of page elements that this page-tag a forms can be then div [id=" search-content "] div [class=" span "] div a.
Particularly, if described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises not unique CLASS attribute or does not comprise CLASS attribute; Described positioning unit 22, specifically may be used for the upper level page elements obtaining described page elements in described target pages; If described upper level page elements comprises ID attribute or unique CLASS attribute, by the ID attribute of described upper level page elements or unique CLASS attribute, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements; If described upper level page elements does not comprise ID attribute or unique CLASS attribute, obtain higher level's page elements of described upper level page elements successively, until get the higher level's page elements comprising ID attribute or unique CLASS attribute, by the page-tag of the ID attribute of this higher level's page elements or unique CLASS attribute, other higher level's page elements described, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements.
It should be noted that, if page elements, such as, higher level's page elements of upper level page elements or upper level page elements comprises ID attribute, described positioning unit 22 can also judge the character whether comprising dynamic change in the ID attribute of described page elements further again, thus determines how described ID attribute becomes the part in the path of described page elements.
Such as, described positioning unit 22, does not comprise the character of dynamic change, by the ID attribute of described page elements, as the part in the path of described page elements in the ID attribute of described page elements if specifically may be used for.
Or, again such as, described positioning unit 22, comprises the character of dynamic change in the ID attribute of described page elements if specifically may be used for, by the part in the ID attribute of described page elements except the character of described dynamic change, as the part in the path of described page elements.Particularly, specifically can adopt canonical matching way, except the character of described dynamic change in the ID attribute of described page elements, by the part in the ID attribute of described page elements except the character of described dynamic change, as the part in the path of described page elements.
Alternatively, in one of the present embodiment possible implementation, as shown in Figure 3, the locating device of the page elements that the present embodiment provides can further include sets up unit 31, for set up described target pages and described page elements element information between corresponding relation; Wherein, described element information comprises the attribute of name of described page elements and the path of described page elements.
Particularly, describedly set up unit 31, specifically can call such as by remote interface, ajax far call, by name (NAME) property store of the path of obtained page elements and this page elements in a database, and be associated with described target pages.Wherein, the data layout of interface can adopt but be not limited to json(JavaScript Object Notation) form etc.In UI test process, UI script can according to the URL(uniform resource locator) of target pages (Uniform Resource Locator, URL), obtain the element information of all page elements in described target pages, and then according to the attribute of name of specified page element, obtain the path of this page elements.
Like this, if the path of page elements changes, the technical scheme that the application provides can be adopted, obtain the path after the change of page elements, the path comprised in the element information of direct this page elements of renewal, without the need to revising UI script, thus reduce the maintenance cost of UI script.
In the present embodiment, by page elements to be positioned in determining unit determination target pages, and then by the generating mode of positioning unit according to the ID attribute of described page elements, at least one item in the uniqueness of the Custom Attributes of described page elements and the CLASS attribute of described page elements, obtain the path of described page elements, make it possible to the location realizing page elements, due to the dom tree without the need to traveling through target pages step by step, the path of page elements can be obtained, therefore, can avoid in prior art owing to adopting the mode traveling through the dom tree of the page step by step to carry out the location of page elements and the very tediously long problem in the path of the page elements obtained that causes, thus improve the efficiency of page elements location.
In addition, adopt the technical scheme that the application provides, can according at least one item in the uniqueness of the CLASS attribute of the Custom Attributes of the generating mode of the ID attribute of described page elements, described page elements and described page elements, obtain the path of described page elements, thus improve dirigibility and the reliability of page elements location.
In addition, adopt the technical scheme that the application provides, no longer rely on the dom tree of target pages, the path of page elements can be obtained, the problem of the acquisition failure in the path of the page elements caused because the dom tree of target pages changes in prior art can be avoided, thus improve the reliability of page elements location.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiments that the application provides, should be understood that, disclosed system, apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form that hardware also can be adopted to add SFU software functional unit realizes.
The above-mentioned integrated unit realized with the form of SFU software functional unit, can be stored in a computer read/write memory medium.Above-mentioned SFU software functional unit is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) perform the part steps of method described in each embodiment of the application.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above embodiment is only in order to illustrate the technical scheme of the application, be not intended to limit; Although with reference to previous embodiment to present application has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of each embodiment technical scheme of the application.

Claims (12)

1. a localization method for page elements, is characterized in that, comprising:
Determine page elements to be positioned in target pages;
According at least one item in the uniqueness of the CLASS attribute of the generating mode of the ID attribute of described page elements, the Custom Attributes of described page elements and described page elements, obtain the path of described page elements; Wherein,
Described Custom Attributes comprises other attributes except ID attribute and CLASS attribute.
2. method according to claim 1, it is characterized in that, at least one item in the uniqueness of the generating mode of the described ID attribute according to described page elements, the Custom Attributes of described page elements and the CLASS attribute of described page elements, obtains the path of described page elements, comprising:
If described page elements comprises ID attribute, and in the ID attribute of described page elements, do not comprise the character of dynamic change, by the ID attribute of described page elements, as the path of described page elements;
If described page elements comprises ID attribute, and in the ID attribute of described page elements, comprise the character of dynamic change, by the part in the ID attribute of described page elements except the character of described dynamic change, as the path of described page elements.
3. method according to claim 1, it is characterized in that, at least one item in the uniqueness of the generating mode of the described ID attribute according to described page elements, the Custom Attributes of described page elements and the CLASS attribute of described page elements, obtains the path of described page elements, comprising:
If described page elements does not comprise ID attribute, and described page elements comprises unique Custom Attributes, by described Custom Attributes, as the path of described page elements.
4. method according to claim 1, it is characterized in that, at least one item in the uniqueness of the generating mode of the described ID attribute according to described page elements, the Custom Attributes of described page elements and the CLASS attribute of described page elements, obtains the path of described page elements, comprising:
If described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises unique CLASS attribute, by described unique CLASS attribute, as the path of described page elements;
If described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises not unique CLASS attribute or does not comprise CLASS attribute,
The upper level page elements of described page elements is obtained in described target pages, described upper level page elements comprises ID attribute or unique CLASS attribute, by the ID attribute of described upper level page elements or unique CLASS attribute, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements; Or
At least two higher level's page elements of described page elements are obtained in described target pages, in described at least two higher level's page elements, five-star higher level's page elements comprises ID attribute or unique CLASS attribute, other higher level's page elements in described at least two higher level's page elements except described five-star higher level's page elements do not comprise ID attribute or unique CLASS attribute, by the ID attribute of described five-star higher level's page elements or unique CLASS attribute, the page-tag of other higher level's page elements described, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements.
5. method according to claim 4, is characterized in that, if described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises not unique CLASS attribute or do not comprise CLASS attribute;
The upper level page elements of described page elements is obtained in described target pages;
If described upper level page elements comprises ID attribute or unique CLASS attribute, by the ID attribute of described upper level page elements or unique CLASS attribute, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements;
If described upper level page elements does not comprise ID attribute or unique CLASS attribute, obtain higher level's page elements of described upper level page elements successively, until get the higher level's page elements comprising ID attribute or unique CLASS attribute, by the page-tag of the ID attribute of this higher level's page elements or unique CLASS attribute, other higher level's page elements described, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements.
6. the method according to the arbitrary claim of Claims 1 to 5, it is characterized in that, at least one item in the uniqueness of the generating mode of the described ID attribute according to described page elements, the Custom Attributes of described page elements and the CLASS attribute of described page elements, after obtaining the path of described page elements, also comprise:
Corresponding relation between the element information setting up described target pages and described page elements; Wherein, described element information comprises the attribute of name of described page elements and the path of described page elements.
7. a locating device for page elements, is characterized in that, comprising:
Determining unit, for determining page elements to be positioned in target pages;
Positioning unit, at least one item in the uniqueness of the CLASS attribute of the generating mode of the ID attribute according to described page elements, the Custom Attributes of described page elements and described page elements, obtains the path of described page elements; Wherein,
Described Custom Attributes comprises other attributes except ID attribute and CLASS attribute.
8. device according to claim 7, is characterized in that, described positioning unit, specifically for
If described page elements comprises ID attribute, and in the ID attribute of described page elements, do not comprise the character of dynamic change, by the ID attribute of described page elements, as the path of described page elements;
If described page elements comprises ID attribute, and in the ID attribute of described page elements, comprise the character of dynamic change, by the part in the ID attribute of described page elements except the character of described dynamic change, as the path of described page elements.
9. device according to claim 7, is characterized in that, described positioning unit, specifically for
If described page elements does not comprise ID attribute, and described page elements comprises unique Custom Attributes, by described Custom Attributes, as the path of described page elements.
10. device according to claim 7, is characterized in that, described positioning unit, specifically for
If described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises unique CLASS attribute, by described unique CLASS attribute, as the path of described page elements;
If described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises not unique CLASS attribute or does not comprise CLASS attribute,
The upper level page elements of described page elements is obtained in described target pages, described upper level page elements comprises ID attribute or unique CLASS attribute, by the ID attribute of described upper level page elements or unique CLASS attribute, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements; Or
At least two higher level's page elements of described page elements are obtained in described target pages, in described at least two higher level's page elements, five-star higher level's page elements comprises ID attribute or unique CLASS attribute, other higher level's page elements in described at least two higher level's page elements except described five-star higher level's page elements do not comprise ID attribute or unique CLASS attribute, by the ID attribute of described five-star higher level's page elements or unique CLASS attribute, the page-tag of other higher level's page elements described, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements.
11. devices according to claim 10, is characterized in that, if described page elements does not comprise ID attribute and unique Custom Attributes, and described page elements comprises not unique CLASS attribute or do not comprise CLASS attribute; Described positioning unit, specifically for
The upper level page elements of described page elements is obtained in described target pages;
If described upper level page elements comprises ID attribute or unique CLASS attribute, by the ID attribute of described upper level page elements or unique CLASS attribute, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements;
If described upper level page elements does not comprise ID attribute or unique CLASS attribute, obtain higher level's page elements of described upper level page elements successively, until get the higher level's page elements comprising ID attribute or unique CLASS attribute, by the page-tag of the ID attribute of this higher level's page elements or unique CLASS attribute, other higher level's page elements described, and not unique CLASS attribute of described page elements or the page-tag of described page elements, as the path of described page elements.
12. devices according to the arbitrary claim of claim 7 ~ 11, it is characterized in that, described device also comprises sets up unit, for
Corresponding relation between the element information setting up described target pages and described page elements; Wherein, described element information comprises the attribute of name of described page elements and the path of described page elements.
CN201410066542.9A 2014-02-26 2014-02-26 Page element positioning method and device Pending CN104866509A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410066542.9A CN104866509A (en) 2014-02-26 2014-02-26 Page element positioning method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410066542.9A CN104866509A (en) 2014-02-26 2014-02-26 Page element positioning method and device

Publications (1)

Publication Number Publication Date
CN104866509A true CN104866509A (en) 2015-08-26

Family

ID=53912344

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410066542.9A Pending CN104866509A (en) 2014-02-26 2014-02-26 Page element positioning method and device

Country Status (1)

Country Link
CN (1) CN104866509A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105279089A (en) * 2015-10-30 2016-01-27 中国人民财产保险股份有限公司 Method and device for obtaining page element
CN105868111A (en) * 2016-03-29 2016-08-17 网易(杭州)网络有限公司 Automatic testing method and device for mobile terminal game
CN106383785A (en) * 2016-09-21 2017-02-08 网易(杭州)网络有限公司 Mobile application debugging method and apparatus
CN107066377A (en) * 2017-01-18 2017-08-18 青岛海信电器股份有限公司 Page elements acquisition methods and terminal device based on android system
CN108073418A (en) * 2017-12-29 2018-05-25 上海全成通信技术有限公司 A kind of page assembly based on JSON specifications defines method
CN108647025A (en) * 2018-05-15 2018-10-12 浙江口碑网络技术有限公司 Processing method and processing device, electronics and the storage device of DOM Document Object Model interior joint
CN109582548A (en) * 2017-09-28 2019-04-05 北京国双科技有限公司 A kind of page elements circle choosing method and device buried a little based on nothing
CN110046090A (en) * 2019-03-05 2019-07-23 阿里巴巴集团控股有限公司 The localization method and device of page elements
CN112579951A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Page element selection method and device, storage medium and equipment
CN113094617A (en) * 2021-03-30 2021-07-09 厦门立林科技有限公司 Web element positioning method and application and storage medium thereof
CN113254751A (en) * 2021-06-24 2021-08-13 北森云计算有限公司 Method, equipment and storage medium for accurately extracting complex webpage structured information
CN113596527A (en) * 2020-04-30 2021-11-02 西安诺瓦星云科技股份有限公司 Program distribution method, device and system and computer readable storage medium
CN113722017A (en) * 2021-09-16 2021-11-30 中国银行股份有限公司 Data processing method and system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101593184A (en) * 2008-05-29 2009-12-02 国际商业机器公司 The system and method for self-adaptively locating dynamic web page elements
CN101662493A (en) * 2008-08-25 2010-03-03 阿里巴巴集团控股有限公司 Data acquiring method, system and server of user access path
WO2010028395A1 (en) * 2008-09-08 2010-03-11 Credit Suisse Securities (Usa) Llc Apparatuses, methods and systems for providing a virtual development and deployment environment including real and synthetic data
CN101944094A (en) * 2009-07-06 2011-01-12 富士通株式会社 Webpage information extraction method and device thereof
US20110113320A1 (en) * 2008-02-21 2011-05-12 Globalenglish Corporation Network-Accessible Collaborative Annotation Tool
CN102469111A (en) * 2010-10-29 2012-05-23 国际商业机器公司 Method and system for analyzing website access
CN102760150A (en) * 2012-04-05 2012-10-31 中国人民解放军国防科学技术大学 Webpage extraction method based on attribute reproduction and labeled path
CN102999578A (en) * 2012-11-13 2013-03-27 北京奇虎科技有限公司 Method and device for processing page element
CN103019925A (en) * 2011-09-26 2013-04-03 阿里巴巴集团控股有限公司 Selector acquisition method and device
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

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110113320A1 (en) * 2008-02-21 2011-05-12 Globalenglish Corporation Network-Accessible Collaborative Annotation Tool
CN101593184A (en) * 2008-05-29 2009-12-02 国际商业机器公司 The system and method for self-adaptively locating dynamic web page elements
US20090300056A1 (en) * 2008-05-29 2009-12-03 Rong Yao Fu System and method for adaptively locating dynamic web page elements
CN101662493A (en) * 2008-08-25 2010-03-03 阿里巴巴集团控股有限公司 Data acquiring method, system and server of user access path
WO2010028395A1 (en) * 2008-09-08 2010-03-11 Credit Suisse Securities (Usa) Llc Apparatuses, methods and systems for providing a virtual development and deployment environment including real and synthetic data
CN101944094A (en) * 2009-07-06 2011-01-12 富士通株式会社 Webpage information extraction method and device thereof
CN102469111A (en) * 2010-10-29 2012-05-23 国际商业机器公司 Method and system for analyzing website access
CN103019925A (en) * 2011-09-26 2013-04-03 阿里巴巴集团控股有限公司 Selector acquisition method and device
CN102760150A (en) * 2012-04-05 2012-10-31 中国人民解放军国防科学技术大学 Webpage extraction method based on attribute reproduction and labeled path
CN102999578A (en) * 2012-11-13 2013-03-27 北京奇虎科技有限公司 Method and device for processing page element
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

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105279089B (en) * 2015-10-30 2017-12-12 中国人民财产保险股份有限公司 A kind of method and device for obtaining page elements
CN105279089A (en) * 2015-10-30 2016-01-27 中国人民财产保险股份有限公司 Method and device for obtaining page element
CN105868111A (en) * 2016-03-29 2016-08-17 网易(杭州)网络有限公司 Automatic testing method and device for mobile terminal game
CN105868111B (en) * 2016-03-29 2018-07-03 网易(杭州)网络有限公司 Game of mobile terminal automatic test approach and device
CN106383785A (en) * 2016-09-21 2017-02-08 网易(杭州)网络有限公司 Mobile application debugging method and apparatus
CN106383785B (en) * 2016-09-21 2018-11-27 网易(杭州)网络有限公司 The adjustment method and device of mobile application
CN107066377A (en) * 2017-01-18 2017-08-18 青岛海信电器股份有限公司 Page elements acquisition methods and terminal device based on android system
CN107066377B (en) * 2017-01-18 2020-11-17 海信视像科技股份有限公司 Page element obtaining method based on Android system and terminal equipment
CN109582548B (en) * 2017-09-28 2022-04-12 北京国双科技有限公司 Page element circle selection method and device based on non-buried points
CN109582548A (en) * 2017-09-28 2019-04-05 北京国双科技有限公司 A kind of page elements circle choosing method and device buried a little based on nothing
CN108073418A (en) * 2017-12-29 2018-05-25 上海全成通信技术有限公司 A kind of page assembly based on JSON specifications defines method
CN108647025A (en) * 2018-05-15 2018-10-12 浙江口碑网络技术有限公司 Processing method and processing device, electronics and the storage device of DOM Document Object Model interior joint
CN110046090A (en) * 2019-03-05 2019-07-23 阿里巴巴集团控股有限公司 The localization method and device of page elements
CN110046090B (en) * 2019-03-05 2023-10-03 创新先进技术有限公司 Page element positioning method and device
CN112579951A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Page element selection method and device, storage medium and equipment
CN113596527A (en) * 2020-04-30 2021-11-02 西安诺瓦星云科技股份有限公司 Program distribution method, device and system and computer readable storage medium
CN113094617A (en) * 2021-03-30 2021-07-09 厦门立林科技有限公司 Web element positioning method and application and storage medium thereof
CN113094617B (en) * 2021-03-30 2022-07-19 厦门立林科技有限公司 Web element positioning method and application and storage medium thereof
CN113254751A (en) * 2021-06-24 2021-08-13 北森云计算有限公司 Method, equipment and storage medium for accurately extracting complex webpage structured information
CN113722017A (en) * 2021-09-16 2021-11-30 中国银行股份有限公司 Data processing method and system

Similar Documents

Publication Publication Date Title
CN104866509A (en) Page element positioning method and device
CN104142826A (en) Method, device and system for constructing page
CN107729475B (en) Webpage element acquisition method, device, terminal and computer-readable storage medium
CN104657451B (en) The processing method and processing device of the page
CN104750789A (en) Label recommendation method and device
CN104462131A (en) Method and device for processing information issuing page
CN105335511A (en) Webpage access method and device
CN104331474A (en) Page processing method and device
CN104636434A (en) Search result processing method and device
CN102664925B (en) A kind of method of displaying searching result and device
CN103177096B (en) Page elements localization method and equipment based on text attribute
CN103678511A (en) Method and device for extracting webpage content according to visualized template
CN104571813A (en) Information displaying method and device
CN104424318A (en) Method and device for controlling page elements
CN103678509A (en) Method and device for generating webpage template
CN103955495A (en) Downloading method and device for page sub-resource
CN104750663A (en) Identification method and device for text messy codes in page
CN103678510A (en) Method and device for providing visualized label for webpage
CN105808642A (en) Recommendation method and device
CN104899217B (en) A kind of implementation method and device of custom feature
CN103488675A (en) Automatic precise extraction device for multi-webpage news comment contents
CN104750670A (en) Page document processing method and device
CN105589918A (en) Method and device for extracting page information
CN106547529A (en) Page makeup method and device
CN105094363A (en) Method and apparatus for processing emotion signal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate 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: 20150826