CN103177096A - Page element positioning method based on text attribute and page element positioning device based on text attribute - Google Patents

Page element positioning method based on text attribute and page element positioning device based on text attribute Download PDF

Info

Publication number
CN103177096A
CN103177096A CN2013100841093A CN201310084109A CN103177096A CN 103177096 A CN103177096 A CN 103177096A CN 2013100841093 A CN2013100841093 A CN 2013100841093A CN 201310084109 A CN201310084109 A CN 201310084109A CN 103177096 A CN103177096 A CN 103177096A
Authority
CN
China
Prior art keywords
text
page
type
page elements
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2013100841093A
Other languages
Chinese (zh)
Other versions
CN103177096B (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201310084109.3A priority Critical patent/CN103177096B/en
Publication of CN103177096A publication Critical patent/CN103177096A/en
Application granted granted Critical
Publication of CN103177096B publication Critical patent/CN103177096B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a page element positioning method based on a text attribute and a page element positioning device based on the text attribute. According to the page element positioning method based on the text attribute and the page element positioning device based on the text attribute, whether a target page element to be positioned has a text attribute or not is confirmed, if the target page element has the text attribute, searching is carried out in a page object according to a target type and a target text to obtain a target page element of a target text included by the text attribute in the page object, so that an object instance of the target page element is enabled to be sent to a client to enable the client to carry out operation on the object instance, a source code of a page object developed by a developer is not needed to be depended on, operation is simple, correct rate is high, and therefore position efficiency and position reliability of the page element are improved.

Description

Page elements localization method and equipment based on text attribute
[technical field]
The present invention relates to page treatment technology, relate in particular to a kind of page elements localization method and equipment based on text attribute.
[background technology]
Along with the development of the communication technology, increasing function that terminal is integrated has comprised more and more corresponding application programs thereby make in the systemic-function list of terminal.Can relate to some WWW (World Wide Web, Web) page in some application program, the Web page by some page elements for example, word, label, hyperlink, button, input frame, combobox etc. form.In prior art, can be according to page elements in source code location of the Web page, namely obtain the object instance of this page elements, then, can carry out to the object instance of this page elements the operation of a series of analog mouses or KeyEvent, for example, left mouse button is clicked, right mouse button is clicked, left mouse button is double-clicked, right mouse button double-click, mouse-over, roller are rolled or the event such as keyboard input.
Yet, need to rely on the source code of the Web page that the developer develops due to the positioning webpage element, complicated operation, and easily make mistakes, thereby caused the efficient of page elements location and the reduction of reliability.
[summary of the invention]
Many aspects of the present invention provide a kind of page elements localization method and equipment based on text attribute, in order to improve efficient and the reliability of page elements location.
An aspect of of the present present invention provides a kind of page elements localization method based on text attribute, comprising:
Determine whether target pages element to be positioned has text attribute;
If described target pages unit have text attribute, according to target type and target text, search in page object, comprise the target pages element of described target text to obtain described page object Chinese version attribute;
Send the object instance of described target pages element to client, so that described client operates described object instance.
Aspect as above and arbitrary possible implementation, a kind of implementation further is provided, if described target pages unit have text attribute, according to target type and target text, search in page object, also comprise before described page object Chinese version attribute comprises the target pages element of described target text obtaining:
Receive the locating request message that described client sends, comprise described target text in described locating request message, perhaps described target type and described target text.
Aspect as above and arbitrary possible implementation further provide a kind of implementation, and described target text comprises the first text; Describedly search in page object according to target type and target text, comprise the target pages element of described target text to obtain described page object Chinese version attribute, comprising:
According to described target type, search in described page object, to obtain in described page object element type as the text attribute of page elements He this page elements of described target type;
Be the text attribute of the page elements of described target type according to element type in described the first text and described page object, element type is that the page elements of described target type is searched in described page object, to obtain described target pages element, the text attribute of described target pages element comprises described the first text.
Aspect as above and arbitrary possible implementation further provide a kind of implementation, and described target text comprises the second text and the 3rd text; Describedly search in page object according to target type and target text, comprise the target pages element of described target text to obtain described page object Chinese version attribute, comprising:
According to described target type, search in described page object, to obtain in described page object element type as the text attribute of page elements He this page elements of described target type;
Be the text attribute of the page elements of described target type according to element type in described the second text and described page object, element type is to search in the page elements of described target type in described page object, comprises at least two page elements of described the second text to obtain text attribute;
If the text attribute of other page elements in the father's container under a page elements in described at least two page elements comprises described the 3rd text, determine that a described page elements is described target pages element.
Aspect as above and arbitrary possible implementation, a kind of implementation further is provided, after whether described definite target pages element to be positioned has text attribute, the described object instance that sends described target pages element to client, so that before described client operates described object instance, also comprise:
If described target pages element does not have text attribute, according to described target type and described target text, search in described page object, comprise to obtain described page object Chinese version attribute that in the father's container under the page elements of described target text, element type is the target pages element of described target type.
Aspect as above and arbitrary possible implementation further provide a kind of implementation, and described target text comprises the 4th text; Described according to described target type and described target text, search in described page object, comprise to obtain described page object Chinese version attribute that in the father's container under the page elements of described target text, element type is the target pages element of described target type, comprising:
According to described the 4th text, search in page object, comprise the page elements of described the 4th text to obtain described page object Chinese version attribute;
If the element type of described page elements is described target type, determine that described page elements is described target pages element;
If the element type of described page elements is not described target type, according to described target type, search in other page elements under described page object Chinese version attribute comprises the page elements of described the 4th text in father's container, to obtain in described other elements element type as the page elements of described target type, as the target pages element.
Aspect as above and arbitrary possible implementation further provide a kind of implementation, and described target text comprises the 5th text and the 6th text; Described according to described target type and described target text, search in described page object, comprise to obtain described page object Chinese version attribute that in the father's container under the page elements of described target text, element type is the target pages element of described target type, comprising:
According to described the 5th text, search in page object, comprise the page elements of described the 5th text to obtain described page object Chinese version attribute;
If the element type of described page elements is not described target type, according to described target type, search in other page elements under described page object Chinese version attribute comprises the page elements of described the 5th text in father's container, to obtain in described other elements element type as at least two page elements of described target type;
If the text attribute of other page elements in the father's container under a page elements in described at least two page elements comprises described the 6th text, determine that a described page elements is described target pages element.
Another aspect of the present invention provides a kind of page elements positioning equipment based on text attribute, comprising:
Determining unit is used for determining whether target pages element to be positioned has text attribute;
Search unit have text attribute if be used for described target pages unit, according to target type and target text, searches in page object, comprises the target pages element of described target text to obtain described page object Chinese version attribute;
Transmitting element is used for to the object instance of the described target pages element of client transmission, so that described client operates described object instance.
Aspect as above and arbitrary possible implementation further provide a kind of implementation, and described equipment also comprises receiving element, is used for
Receive the locating request message that described client sends, comprise described target text in described locating request message, perhaps described target type and described target text.
Aspect as above and arbitrary possible implementation further provide a kind of implementation, and described target text comprises the first text; Described search unit specifically is used for
According to described target type, search in described page object, to obtain in described page object element type as the text attribute of page elements He this page elements of described target type;
Be the text attribute of the page elements of described target type according to element type in described the first text and described page object, element type is that the page elements of described target type is searched in described page object, to obtain described target pages element, the text attribute of described target pages element comprises described the first text.
Aspect as above and arbitrary possible implementation further provide a kind of implementation, and described target text comprises the second text and the 3rd text; Described search unit specifically is used for
According to described target type, search in described page object, to obtain in described page object element type as the text attribute of page elements He this page elements of described target type;
Be the text attribute of the page elements of described target type according to element type in described the second text and described page object, element type is to search in the page elements of described target type in described page object, comprises at least two page elements of described the second text to obtain text attribute;
If the text attribute of other page elements in the father's container under a page elements in described at least two page elements comprises described the 3rd text, determine that a described page elements is described target pages element.
Aspect as above and arbitrary possible implementation further provide a kind of implementation, and described search unit also is used for
If described target pages element does not have text attribute, according to described target type and described target text, search in described page object, comprise to obtain described page object Chinese version attribute that in the father's container under the page elements of described target text, element type is the target pages element of described target type.
Aspect as above and arbitrary possible implementation further provide a kind of implementation, and described target text comprises the 4th text; Described search unit specifically is used for
According to described the 4th text, search in page object, comprise the page elements of described the 4th text to obtain described page object Chinese version attribute;
If the element type of described page elements is described target type, determine that described page elements is described target pages element;
If the element type of described page elements is not described target type, according to described target type, search in other page elements under described page object Chinese version attribute comprises the page elements of described the 4th text in father's container, to obtain in described other elements element type as the page elements of described target type, as the target pages element.
Aspect as above and arbitrary possible implementation further provide a kind of implementation, and described target text comprises the 5th text and the 6th text; Described search unit specifically is used for
According to described the 5th text, search in page object, comprise the page elements of described the 5th text to obtain described page object Chinese version attribute;
If the element type of described page elements is not described target type, according to described target type, search in other page elements under described page object Chinese version attribute comprises the page elements of described the 5th text in father's container, to obtain in described other elements element type as at least two page elements of described target type;
If the text attribute of other page elements in the father's container under a page elements in described at least two page elements comprises described the 6th text, determine that a described page elements is described target pages element.
as shown from the above technical solution, the embodiment of the present invention is by determining whether target pages element to be positioned has text attribute, if described target pages unit have text attribute, can be according to target type and target text, search in page object, the target pages element that comprises described target text to obtain described page object Chinese version attribute, make it possible to send to client the object instance of described target pages element, so that described client operates described object instance, need not to rely on the source code of the page object that the developer develops, simple to operate, and accuracy is high, thereby efficient and the reliability of page elements location have been improved.
[description of drawings]
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, the below will do one to the accompanying drawing of required use in embodiment or description of the Prior Art and introduce simply, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The schematic flow sheet based on the page elements localization method of text attribute that Fig. 1 provides for one embodiment of the invention;
Fig. 2 is the schematic diagram of a target web element in embodiment corresponding to Fig. 1;
Fig. 3 is the schematic diagram of another target web element in embodiment corresponding to Fig. 1;
Fig. 4 is the schematic diagram of another target web element in embodiment corresponding to Fig. 1;
Fig. 5 is the schematic diagram of another target web element in embodiment corresponding to Fig. 1;
The structural representation based on the page elements positioning equipment of text attribute that Fig. 6 provides for another embodiment of the present invention;
The structural representation based on the page elements positioning equipment of text attribute that Fig. 7 provides for another embodiment of the present invention.
[embodiment]
For the purpose, technical scheme and the advantage that make the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills belong to the scope of protection of the invention not making whole other embodiment that obtain under the creative work prerequisite.
Need to prove, in the embodiment of the present invention, related terminal can include but not limited to mobile phone, personal digital assistant (Personal Digital Assistant, PDA), radio hand-held equipment, wireless Internet access basis, PC, portable computer, PC (Personal Computer, PC), MP3 player, MP4 player etc.
In addition, herein term " and/or ", be only a kind of incidence relation of describing affiliated partner, can there be three kinds of relations in expression, for example, A and/or B can represent: individualism A exists A and B, these three kinds of situations of individualism B simultaneously.In addition, character "/", represent that generally forward-backward correlation is to liking a kind of relation of "or" herein.
The schematic flow sheet based on the page elements localization method of text attribute that Fig. 1 provides for one embodiment of the invention, as shown in Figure 1.
101, determine whether target pages element to be positioned has text attribute.
If 102 described target pages units have text attribute, according to target type and target text, search in page object, comprise the target pages element of described target text to obtain described page object Chinese version attribute.
103, send the object instance of described target pages element to client, so that described client operates described object instance.
Be understandable that, the page involved in the present invention can be based on the webpage (Web Page) that HTML (Hypertext Markup Language) (HyperText Markup Language, HTML) is write, and also can be called the Web page.
Need to prove, 101~103 executive agent can be positioning equipment, can be arranged in local client, locates to carry out off-line, perhaps can also be arranged in the server of network side, and to locate online, the present embodiment does not limit this.
Be understandable that, described client can be mounted in the application program on terminal, can also be perhaps a webpage of browser, as long as can realize page elements location, with the outwardness form of the object instance that obtains this page elements can, the present embodiment does not limit this.
like this, by determining whether target pages element to be positioned has text attribute, if described target pages unit have text attribute, can be according to target type and target text, search in page object, the target pages element that comprises described target text to obtain described page object Chinese version attribute, make it possible to send to client the object instance of described target pages element, so that described client operates described object instance, need not to rely on the source code of the page object that the developer develops, simple to operate, and accuracy is high, thereby efficient and the reliability of page elements location have been improved.
Existing page elements localization method based on text attribute according to the source code of the Web page, then further combined with element property, obtains the routing information of a page elements, to locate a page elements.This method need to rely on the source code of the page object that the developer develops fully, complicated operation, and easily makeing mistakes, and efficient and the reliability of page elements location are low.
Alternatively, in one of the present embodiment possible implementation, before 102, positioning equipment can also further receive the locating request message that described client sends, comprise described target text in described locating request message, perhaps described target type and described target text.That is to say, if only comprised target text in described locating request message, and do not comprise target type, can be by described positioning equipment according to this target type of configuration information automatic acquisition.
Particularly, described target type can include but not limited in following at least one: word, label, hyperlink, button, input frame and combobox, the present embodiment does not limit this.
Alternatively, in one of the present embodiment possible implementation, described target text can comprise the first text.
Correspondingly, in 102, positioning equipment specifically can be searched in described page object according to described target type, to obtain in described page object element type as the text attribute of page elements He this page elements of described target type.Then, described positioning equipment can be the text attribute of the page elements of described target type according to element type in described the first text and described page object, element type is that the page elements of described target type is searched in described page object, to obtain described target pages element, the text attribute of described target pages element comprises described the first text.For example, hyperlink in the Web webpage, as shown in Figure 2, target type comprises hyperlink at least, the first text can be the words such as " homepage ", " mentioning mine ", " comment ", positioning equipment specifically can adopt this method, obtains the hyperlink such as " homepage ", " mentioning mine ", " comment ", as the target pages element.
Alternatively, in one of the present embodiment possible implementation, described target text can also comprise the second text and the 3rd text.
Correspondingly, in 102, positioning equipment specifically can be searched in described page object according to described target type, to obtain in described page object element type as the text attribute of page elements He this page elements of described target type.Then, described positioning equipment can be the text attribute of the page elements of described target type according to element type in described the second text and described page object, element type is to search in the page elements of described target type in described page object, comprises at least two page elements of described the second text to obtain text attribute.If the text attribute of other page elements in the father's container under a page elements in described at least two page elements comprises described the 3rd text, described positioning equipment can determine that a described page elements is described target pages element.For example, the hyperlink that text attribute in the Web webpage is identical, as shown in Figure 3, target type comprises hyperlink at least, the second text can be " checking details ", and the 3rd text can be the words such as " function 1 ", " function 2 ", " function 3 ", and positioning equipment specifically can adopt this method, obtain " function 1 " corresponding " checking details ", hyperlink such as " checking details " corresponding to " function 2 ", as the target pages element.
Alternatively, in one of the present embodiment possible implementation, after 101, before 103, if can also further carrying out described target pages element, positioning equipment there is no text attribute, according to described target type and described target text, search in described page object, comprise to obtain described page object Chinese version attribute that in the father's container under the page elements of described target text, element type is the target pages element of described target type.
In this implementation, described target text can comprise the 4th text.Correspondingly, described positioning equipment specifically can be searched in page object according to described the 4th text, comprises the page elements of described the 4th text to obtain described page object Chinese version attribute.Then, if the element type of described page elements is described target type, described positioning equipment determines that described page elements is described target pages element.If the element type of described page elements is not described target type, described positioning equipment is according to described target type, search in other page elements under described page object Chinese version attribute comprises the page elements of described the 4th text in father's container, to obtain in described other elements element type as the page elements of described target type, as the target pages element.For example, input frame in the Web webpage, as shown in Figure 4, target type comprises the types such as label, text, the 4th text can be " input want manage website ", positioning equipment specifically can adopt this method, obtains near the input frame " input want manage website ", as the target pages element.
In this implementation, described target text can also comprise the 5th text and the 6th text.Correspondingly, described positioning equipment specifically can be searched in page object according to described the 5th text, comprises the page elements of described the 5th text to obtain described page object Chinese version attribute.Then, if the element type of described page elements is not described target type, described positioning equipment can be according to described target type, search in other page elements under described page object Chinese version attribute comprises the page elements of described the 5th text in father's container, to obtain in described other elements element type as at least two page elements of described target type.If the text attribute of other page elements in the father's container under a page elements in described at least two page elements comprises described the 6th text, described positioning equipment can determine that a described page elements is described target pages element.For example, input frame in the Web webpage, as shown in Figure 5, target type comprises the types such as label, text, the 5th text can be " input want manage website ", and the 6th text can be " function 1 ", and positioning equipment specifically can adopt this method, obtain near the input frame " function 1 " corresponding " input want manage website ", as the target pages element.
in the present embodiment, by determining whether target pages element to be positioned has text attribute, if described target pages unit have text attribute, can be according to target type and target text, search in page object, the target pages element that comprises described target text to obtain described page object Chinese version attribute, make it possible to send to client the object instance of described target pages element, so that described client operates described object instance, need not to rely on the source code of the page object that the developer develops, simple to operate, and accuracy is high, thereby efficient and the reliability of page elements location have been improved.
In addition, adopt technical scheme provided by the invention, need not to rely on the source code of the page object that the developer develops, therefore, as long as target pages element or constant with the text attribute of the related page elements of this target pages element, even the layout of the page changes, namely source code changes, also can position this target pages element, thereby can further improve the reliability of page elements location.
Need to prove, for aforesaid each embodiment of the method, for simple description, therefore it all is expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not subjected to the restriction of described sequence of movement, because according to the present invention, 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 related action and module might not be that the present invention is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, there is no the part that describes in detail in certain embodiment, can be referring to the associated description of other embodiment.
The structural representation based on the page elements positioning equipment of text attribute that Fig. 6 provides for another embodiment of the present invention, as shown in Figure 6.The page elements positioning equipment based on text attribute of the present embodiment can comprise determining unit 61, search unit 62 and transmitting element 63.Wherein, determining unit 61 is used for determining whether target pages element to be positioned has text attribute; Search unit 62 have text attribute if be used for described target pages unit, according to target type and target text, searches in page object, comprises the target pages element of described target text to obtain described page object Chinese version attribute; Transmitting element 63 is used for to the object instance of the described target pages element of client transmission, so that described client operates described object instance.
Be understandable that, the page involved in the present invention can be based on the webpage (Web Page) that HTML (Hypertext Markup Language) (HyperText Markup Language, HTML) is write, and also can be called the Web page.
Need to prove, the equipment that the present embodiment provides can be positioning equipment, can be arranged in local client, locates to carry out off-line, perhaps can also be arranged in the server of network side, and to locate online, the present embodiment does not limit this.
Be understandable that, described client can be mounted in the application program on terminal, can also be perhaps a webpage of browser, as long as can realize page elements location, with the outwardness form of the object instance that obtains this page elements can, the present embodiment does not limit this.
like this, determine by determining unit whether target pages element to be positioned has text attribute, if and then the described target pages of search unit unit have text attribute, can be according to target type and target text, search in page object, the target pages element that comprises described target text to obtain described page object Chinese version attribute, make transmitting element can send to client the object instance of described target pages element, so that described client operates described object instance, need not to rely on the source code of the page object that the developer develops, simple to operate, and accuracy is high, thereby efficient and the reliability of page elements location have been improved.
Existing page elements positioning equipment based on text attribute according to the source code of the Web page, then further combined with element property, obtains the routing information of a page elements, to locate a page elements.This equipment need to rely on the source code of the page object that the developer develops fully, complicated operation, and easily makeing mistakes, and efficient and the reliability of page elements location are low.
Alternatively, in one of the present embodiment possible implementation, as shown in Figure 7, the page elements positioning equipment based on text attribute that the present embodiment provides can further include receiving element 71, be used for receiving the locating request message that described client sends, comprise described target text in described locating request message, perhaps described target type and described target text.That is to say, if only comprised target text in described locating request message, and do not comprise target type, can be by described search unit 62 according to this target type of configuration information automatic acquisition.
Particularly, described target type can include but not limited in following at least one: word, label, hyperlink, button, input frame and combobox, the present embodiment does not limit this.
Alternatively, in one of the present embodiment possible implementation, described target text can comprise the first text.
Correspondingly, described search unit 62 specifically can be used for according to described target type, searches in described page object, to obtain in described page object element type as the text attribute of page elements He this page elements of described target type; Then, be the text attribute of the page elements of described target type according to element type in described the first text and described page object, element type is that the page elements of described target type is searched in described page object, to obtain described target pages element, the text attribute of described target pages element comprises described the first text.For example, hyperlink in the Web webpage, as shown in Figure 2, target type comprises hyperlink at least, the first text can be the words such as " homepage ", " mentioning mine ", " comment ", positioning equipment specifically can adopt this method, obtains the hyperlink such as " homepage ", " mentioning mine ", " comment ", as the target pages element.
Alternatively, in one of the present embodiment possible implementation, described target text can also comprise the second text and the 3rd text.
Correspondingly, described search unit 62 specifically can be used for according to described target type, searches in described page object, to obtain in described page object element type as the text attribute of page elements He this page elements of described target type; Then, be the text attribute of the page elements of described target type according to element type in described the second text and described page object, element type is to search in the page elements of described target type in described page object, comprises at least two page elements of described the second text to obtain text attribute; If the text attribute of other page elements in the father's container under a page elements in described at least two page elements comprises described the 3rd text, determine that a described page elements is described target pages element.For example, the hyperlink that text attribute in the Web webpage is identical, as shown in Figure 3, target type comprises hyperlink at least, the second text can be " checking details ", and the 3rd text can be the words such as " function 1 ", " function 2 ", " function 3 ", and positioning equipment specifically can adopt this method, obtain " function 1 " corresponding " checking details ", hyperlink such as " checking details " corresponding to " function 2 ", as the target pages element.
Alternatively, in one of the present embodiment possible implementation, described search unit 62, there is no text attribute if can also be further used for described target pages element, according to described target type and described target text, search in described page object, comprise to obtain described page object Chinese version attribute that in the father's container under the page elements of described target text, element type is the target pages element of described target type.
In this implementation, described target text can comprise the 4th text.Correspondingly, described search unit 62 specifically can be used for according to described the 4th text, searches in page object, comprises the page elements of described the 4th text to obtain described page object Chinese version attribute; Then, if the element type of described page elements is described target type, determine that described page elements is described target pages element; If the element type of described page elements is not described target type, according to described target type, search in other page elements under described page object Chinese version attribute comprises the page elements of described the 4th text in father's container, to obtain in described other elements element type as the page elements of described target type, as the target pages element.For example, input frame in the Web webpage, as shown in Figure 4, target type comprises the types such as label, text, the 4th text can be " input want manage website ", positioning equipment specifically can adopt this method, obtains near the input frame " input want manage website ", as the target pages element.
In this implementation, described target text can also comprise the 5th text and the 6th text.Correspondingly, described search unit 62 specifically can be used for according to described the 5th text, searches in page object, comprises the page elements of described the 5th text to obtain described page object Chinese version attribute; Then, if the element type of described page elements is not described target type, according to described target type, search in other page elements under described page object Chinese version attribute comprises the page elements of described the 5th text in father's container, to obtain in described other elements element type as at least two page elements of described target type; If the text attribute of other page elements in the father's container under a page elements in described at least two page elements comprises described the 6th text, determine that a described page elements is described target pages element.For example, input frame in the Web webpage, as shown in Figure 5, target type comprises the types such as label, text, the 5th text can be " input want manage website ", and the 6th text can be " function 1 ", and positioning equipment specifically can adopt this method, obtain near the input frame " function 1 " corresponding " input want manage website ", as the target pages element.
in the present embodiment, determine by determining unit whether target pages element to be positioned has text attribute, if and then the described target pages of search unit unit have text attribute, can be according to target type and target text, search in page object, the target pages element that comprises described target text to obtain described page object Chinese version attribute, make transmitting element can send to client the object instance of described target pages element, so that described client operates described object instance, need not to rely on the source code of the page object that the developer develops, simple to operate, and accuracy is high, thereby efficient and the reliability of page elements location have been improved.
In addition, adopt technical scheme provided by the invention, need not to rely on the source code of the page object that the developer develops, therefore, as long as target pages element or constant with the text attribute of the related page elements of this target pages element, even the layout of the page changes, namely source code changes, also can position this target pages element, thereby can further improve the reliability of page elements location.
The those skilled in the art can be well understood to, and is the convenience described and succinct, the system of foregoing description, and the specific works process of device and unit can with reference to the corresponding process in preceding method embodiment, not repeat them here.
In several embodiment provided by the present invention, should be understood that, disclosed system, apparatus and method can realize by another way.For example, device embodiment described above is only schematic, for example, the division of described unit, be only that a kind of logic function is divided, during actual the realization, other dividing mode can be arranged, for example a plurality of unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
Described unit as separating component explanation can or can not be also physically to separate, and the parts that show as the unit can be or can not be also physical locations, namely can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select according to the actual needs wherein some or all of unit to realize the purpose of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, the form that also can adopt hardware to add SFU software functional unit realizes.
The above-mentioned integrated unit of realizing 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, comprise that some instructions are with so that a computer equipment (can be personal computer, server, the perhaps network equipment etc.) or processor (processor) carry out the part steps of the described method of each embodiment of the present invention.And aforesaid storage medium comprises: the various media that can be program code stored such as 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.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment, the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme that aforementioned each embodiment puts down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (14)

1. the page elements localization method based on text attribute, is characterized in that, comprising:
Determine whether target pages element to be positioned has text attribute;
If described target pages unit have text attribute, according to target type and target text, search in page object, comprise the target pages element of described target text to obtain described page object Chinese version attribute;
Send the object instance of described target pages element to client, so that described client operates described object instance.
2. method according to claim 1, it is characterized in that, if described target pages unit have text attribute, according to target type and target text, search in page object, also comprise before described page object Chinese version attribute comprises the target pages element of described target text obtaining:
Receive the locating request message that described client sends, comprise described target text in described locating request message, perhaps described target type and described target text.
3. method according to claim 1 and 2, is characterized in that, described target text comprises the first text; Describedly search in page object according to target type and target text, comprise the target pages element of described target text to obtain described page object Chinese version attribute, comprising:
According to described target type, search in described page object, to obtain in described page object element type as the text attribute of page elements He this page elements of described target type;
Be the text attribute of the page elements of described target type according to element type in described the first text and described page object, element type is that the page elements of described target type is searched in described page object, to obtain described target pages element, the text attribute of described target pages element comprises described the first text.
4. method according to claim 1 and 2, is characterized in that, described target text comprises the second text and the 3rd text; Describedly search in page object according to target type and target text, comprise the target pages element of described target text to obtain described page object Chinese version attribute, comprising:
According to described target type, search in described page object, to obtain in described page object element type as the text attribute of page elements He this page elements of described target type;
Be the text attribute of the page elements of described target type according to element type in described the second text and described page object, element type is to search in the page elements of described target type in described page object, comprises at least two page elements of described the second text to obtain text attribute;
If the text attribute of other page elements in the father's container under a page elements in described at least two page elements comprises described the 3rd text, determine that a described page elements is described target pages element.
5. according to claim 1~4 described methods of arbitrary claim, it is characterized in that, after whether described definite target pages element to be positioned has text attribute, the described object instance that sends described target pages element to client, so that before described client operates described object instance, also comprise:
If described target pages element does not have text attribute, according to described target type and described target text, search in described page object, comprise to obtain described page object Chinese version attribute that in the father's container under the page elements of described target text, element type is the target pages element of described target type.
6. method according to claim 5, is characterized in that, described target text comprises the 4th text; Described according to described target type and described target text, search in described page object, comprise to obtain described page object Chinese version attribute that in the father's container under the page elements of described target text, element type is the target pages element of described target type, comprising:
According to described the 4th text, search in page object, comprise the page elements of described the 4th text to obtain described page object Chinese version attribute;
If the element type of described page elements is described target type, determine that described page elements is described target pages element;
If the element type of described page elements is not described target type, according to described target type, search in other page elements under described page object Chinese version attribute comprises the page elements of described the 4th text in father's container, to obtain in described other elements element type as the page elements of described target type, as the target pages element.
7. method according to claim 5, is characterized in that, described target text comprises the 5th text and the 6th text; Described according to described target type and described target text, search in described page object, comprise to obtain described page object Chinese version attribute that in the father's container under the page elements of described target text, element type is the target pages element of described target type, comprising:
According to described the 5th text, search in page object, comprise the page elements of described the 5th text to obtain described page object Chinese version attribute;
If the element type of described page elements is not described target type, according to described target type, search in other page elements under described page object Chinese version attribute comprises the page elements of described the 5th text in father's container, to obtain in described other elements element type as at least two page elements of described target type;
If the text attribute of other page elements in the father's container under a page elements in described at least two page elements comprises described the 6th text, determine that a described page elements is described target pages element.
8. the page elements positioning equipment based on text attribute, is characterized in that, comprising:
Determining unit is used for determining whether target pages element to be positioned has text attribute;
Search unit have text attribute if be used for described target pages unit, according to target type and target text, searches in page object, comprises the target pages element of described target text to obtain described page object Chinese version attribute;
Transmitting element is used for to the object instance of the described target pages element of client transmission, so that described client operates described object instance.
9. equipment according to claim 8, is characterized in that, described equipment also comprises receiving element, is used for
Receive the locating request message that described client sends, comprise described target text in described locating request message, perhaps described target type and described target text.
10. according to claim 8 or 9 described equipment, is characterized in that, described target text comprises the first text; Described search unit specifically is used for
According to described target type, search in described page object, to obtain in described page object element type as the text attribute of page elements He this page elements of described target type;
Be the text attribute of the page elements of described target type according to element type in described the first text and described page object, element type is that the page elements of described target type is searched in described page object, to obtain described target pages element, the text attribute of described target pages element comprises described the first text.
11. according to claim 8 or 9 described equipment is characterized in that, described target text comprises the second text and the 3rd text; Described search unit specifically is used for
According to described target type, search in described page object, to obtain in described page object element type as the text attribute of page elements He this page elements of described target type;
Be the text attribute of the page elements of described target type according to element type in described the second text and described page object, element type is to search in the page elements of described target type in described page object, comprises at least two page elements of described the second text to obtain text attribute;
If the text attribute of other page elements in the father's container under a page elements in described at least two page elements comprises described the 3rd text, determine that a described page elements is described target pages element.
12. according to claim 8~11 described equipment of arbitrary claim is characterized in that described search unit also is used for
If described target pages element does not have text attribute, according to described target type and described target text, search in described page object, comprise to obtain described page object Chinese version attribute that in the father's container under the page elements of described target text, element type is the target pages element of described target type.
13. equipment according to claim 12 is characterized in that, described target text comprises the 4th text; Described search unit specifically is used for
According to described the 4th text, search in page object, comprise the page elements of described the 4th text to obtain described page object Chinese version attribute;
If the element type of described page elements is described target type, determine that described page elements is described target pages element;
If the element type of described page elements is not described target type, according to described target type, search in other page elements under described page object Chinese version attribute comprises the page elements of described the 4th text in father's container, to obtain in described other elements element type as the page elements of described target type, as the target pages element.
14. equipment according to claim 12 is characterized in that, described target text comprises the 5th text and the 6th text; Described search unit specifically is used for
According to described the 5th text, search in page object, comprise the page elements of described the 5th text to obtain described page object Chinese version attribute;
If the element type of described page elements is not described target type, according to described target type, search in other page elements under described page object Chinese version attribute comprises the page elements of described the 5th text in father's container, to obtain in described other elements element type as at least two page elements of described target type;
If the text attribute of other page elements in the father's container under a page elements in described at least two page elements comprises described the 6th text, determine that a described page elements is described target pages element.
CN201310084109.3A 2013-03-15 2013-03-15 Page elements localization method and equipment based on text attribute Active CN103177096B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310084109.3A CN103177096B (en) 2013-03-15 2013-03-15 Page elements localization method and equipment based on text attribute

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310084109.3A CN103177096B (en) 2013-03-15 2013-03-15 Page elements localization method and equipment based on text attribute

Publications (2)

Publication Number Publication Date
CN103177096A true CN103177096A (en) 2013-06-26
CN103177096B CN103177096B (en) 2019-02-05

Family

ID=48636957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310084109.3A Active CN103177096B (en) 2013-03-15 2013-03-15 Page elements localization method and equipment based on text attribute

Country Status (1)

Country Link
CN (1) CN103177096B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424087A (en) * 2013-08-21 2015-03-18 阿里巴巴集团控股有限公司 Web page element positioning method, apparatus and system
CN104866509A (en) * 2014-02-26 2015-08-26 阿里巴巴集团控股有限公司 Page element positioning method and device
CN107861779A (en) * 2017-09-20 2018-03-30 东软集团股份有限公司 Page object localization method and device, storage medium, electronic equipment
CN110399063A (en) * 2019-07-19 2019-11-01 口碑(上海)信息技术有限公司 The inspection method and device of page elements attribute
CN112559112A (en) * 2021-02-25 2021-03-26 智道网联科技(北京)有限公司 Interface node positioning method and device
CN113051514A (en) * 2021-03-26 2021-06-29 挂号网(杭州)科技有限公司 Element positioning method and device, electronic equipment and storage medium
CN114721758A (en) * 2022-03-29 2022-07-08 北京百度网讯科技有限公司 Page positioning method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6847959B1 (en) * 2000-01-05 2005-01-25 Apple Computer, Inc. Universal interface for retrieval of information in a computer system
US7752222B1 (en) * 2007-07-20 2010-07-06 Google Inc. Finding text on a web page
CN102117290A (en) * 2009-12-30 2011-07-06 北京搜狗科技发展有限公司 Method and system used for showing page elements in webpage
CN102521121A (en) * 2011-11-18 2012-06-27 华为技术有限公司 Page testing method and page testing device
CN102708174A (en) * 2012-05-04 2012-10-03 奇智软件(北京)有限公司 Method and device for displaying rich media information in browser
US8396853B2 (en) * 2004-03-15 2013-03-12 Yahoo! Inc. Inverse search systems and methods

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6847959B1 (en) * 2000-01-05 2005-01-25 Apple Computer, Inc. Universal interface for retrieval of information in a computer system
US8396853B2 (en) * 2004-03-15 2013-03-12 Yahoo! Inc. Inverse search systems and methods
US7752222B1 (en) * 2007-07-20 2010-07-06 Google Inc. Finding text on a web page
CN102117290A (en) * 2009-12-30 2011-07-06 北京搜狗科技发展有限公司 Method and system used for showing page elements in webpage
CN102521121A (en) * 2011-11-18 2012-06-27 华为技术有限公司 Page testing method and page testing device
CN102708174A (en) * 2012-05-04 2012-10-03 奇智软件(北京)有限公司 Method and device for displaying rich media information in browser

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424087A (en) * 2013-08-21 2015-03-18 阿里巴巴集团控股有限公司 Web page element positioning method, apparatus and system
CN104424087B (en) * 2013-08-21 2017-07-28 阿里巴巴集团控股有限公司 A kind of method of Web page surface element positioning, apparatus and system
CN104866509A (en) * 2014-02-26 2015-08-26 阿里巴巴集团控股有限公司 Page element positioning method and device
CN107861779A (en) * 2017-09-20 2018-03-30 东软集团股份有限公司 Page object localization method and device, storage medium, electronic equipment
CN110399063A (en) * 2019-07-19 2019-11-01 口碑(上海)信息技术有限公司 The inspection method and device of page elements attribute
CN112559112A (en) * 2021-02-25 2021-03-26 智道网联科技(北京)有限公司 Interface node positioning method and device
CN112559112B (en) * 2021-02-25 2021-05-14 智道网联科技(北京)有限公司 Interface node positioning method and device
CN113051514A (en) * 2021-03-26 2021-06-29 挂号网(杭州)科技有限公司 Element positioning method and device, electronic equipment and storage medium
CN113051514B (en) * 2021-03-26 2023-05-26 挂号网(杭州)科技有限公司 Element positioning method and device, electronic equipment and storage medium
CN114721758A (en) * 2022-03-29 2022-07-08 北京百度网讯科技有限公司 Page positioning method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN103177096B (en) 2019-02-05

Similar Documents

Publication Publication Date Title
CN103177096A (en) Page element positioning method based on text attribute and page element positioning device based on text attribute
CN104750789A (en) Label recommendation method and device
US8738448B2 (en) Web page ad slot identification
US10599659B2 (en) Method and system for evaluating user satisfaction with respect to a user session
CN102609474B (en) A kind of visit information supplying method and system
CN105279224A (en) Information push method and device
CN104866509A (en) Page element positioning method and device
CN104142826A (en) Method, device and system for constructing page
US11164210B2 (en) Method, device and computer storage medium for promotion displaying
CN105335511A (en) Webpage access method and device
CN102411614A (en) Display Of Image Search Results
US9514113B1 (en) Methods for automatic footnote generation
CN108932320B (en) Article searching method and device and electronic equipment
CN104331474A (en) Page processing method and device
CN104571813A (en) Information displaying method and device
CN103714141A (en) Information pushing method and device
CN103955495A (en) Downloading method and device for page sub-resource
CN105955593B (en) Method and device for presenting discussion information
CN103823849A (en) Method and device for acquiring entries
CN104142990A (en) Search method and device
CN102664925A (en) Method and apparatus for displaying searching result
CN104199952A (en) Method and device for acquiring information of interest points
CN104199701A (en) Method and device for starting applications in browser
CN103870553A (en) Input resource pushing method and system
CN103200229A (en) Processing method of pushed information, equipment, browser and browser plug-in

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant