Web-based automated HTML element location provider
AssigneeSap SE
InventorsSuren Zheng, Yawen Zhang, Jiagang Cao, Ronghua Bao, Ping Ni
Life of this patent
Estimating the term…
Abstract
Briefly, embodiments of a system, method, and article for receiving a user selection of a HyperText Markup Language (HTML) element on a web page. A source representation of objects which comprise a structure and content of the web page may be automatically acquired. The source representation may be automatically processed to determine an ordered list of candidate locations for the HTML element. An output locator may be generated and displayed. The output locator may present the ordered list of location candidates for the HTML element.
Claims16
A method, comprising:
- receiving a user selection of a HyperText Markup Language (HTML) element on a web page;
- automatically acquiring a source representation of objects which comprise a structure and content of the web page;
- automatically processing the source representation to determine an ordered list of two or more candidate locations for the HTML element, wherein the automatically processing the source representation includes determining whether the HTML element has a tag comprising an input, button, or radio;
- in response to determining that the HTML element does not have a tag comprising an input, button, or radio, generating an output locator comprising the HTML element's inner text;
- in response to determining that the HTML element has a tag comprising an input, button, or radio, determining whether the HTML element has a table as a parent node, and
- in response to determining that the HTML element has a table as a parent node, generating the output locator comprising a table tag as a prefix, the output locator presenting the ordered list of two or more location candidates for the HTML element, or
- in response to determining that the HTML element does not have a table as a parent node, generating the output locator by combining the HTML elements' tag name, main attributes, and inner text if the HTML element is not context sensitive, or generating the output locator with the HTML element's dependent elements as the prefix if the HTML element is context sensitive;
- and
- displaying the output locator.
An article, comprising:
- a non-transitory storage medium comprising machine-readable instructions executable by a processor to perform:
- processing a received user selection of a HyperText Markup Language (HTML) element on a web page;
- automatically determining whether the HTML element is inside of a shadow root of a Document Object Model (DOM) tree for the web page;
- in response to automatically determining that the HTML element is not inside of a shadow host, determining whether the HTML element has a tag comprising an input, button, or radio;
- in response to automatically determining that the HTML element does not have a tag comprising an input, button, or radio, generating the output locator comprising the HTML element's inner text,
- in response to automatically determining that the HTML element has a tag comprising an input, button, or radio, determining whether the HTML element has a table as a parent node;
- in response to determining that the HTML element has a table as a parent node, generating the output locator comprising a table tag as a prefix,
- in response to determining that the HTML element does not have a table as a parent node, generating the output locator by combining the HTML elements' tag name, main attributes, and inner text if the HTML element is not context sensitive, or generating the output locator with the HTML element's dependent elements as the prefix if the HTML element is context sensitive;
- and
- responsive to generating the output locator, displaying an ordered list of candidate locations for the HTML element.
A system comprising:
- at least one programmable processor;
- a receiver to receive a user selection of a HyperText Markup Language (HTML) element on a web page;
- and
- a non-transitory machine-readable medium storing instructions that, when executed by the at least one programmable processor, cause the at least one programmable processor to perform operations comprising:
- automatically acquiring a source representation of the objects that comprise the structure and content of the web page;
- automatically processing the source representation to determine an ordered list of two or more location candidates indicating respective candidate locations for the HTML element, wherein the automatically processing the source representation includes determining whether the HTML element has a tag comprising an input, button, or radio;
- in response to determining that the HTML element does not have a tag comprising an input, button, or radio, generating an output locator comprising the HTML element's inner text;
- in response to determining that the HTML element has a tag comprising an input, button, or radio, determining whether the HTML element has a table as a parent node, and
- in response to determining that the HTML element has a table as a parent node, generating the output locator comprising a table tag as a prefix, the output locator presenting the ordered list of two or more location candidates for the HTML element, or
- in response to determining that the HTML element does not have a table as a parent node, generating the output locator by combining the HTML elements' tag name, main attributes, and inner text if the HTML element is not context sensitive, or generating the output locator with the HTML element's dependent elements as the prefix if the HTML element is context sensitive;
- and
- displaying the output locator.
Dependencies are inferred from the claim text.