User interface element object identification and automatic test method and apparatus

An automated testing and user interface technology, applied in software testing/debugging, etc., can solve problems such as the inability to automatically build a page element object library, the difficulty of locating elements, and the inability to locate elements, so as to achieve convenient, fast and accurate identification, unified management, and shorten construction The effect of saving time and human resources

Inactive Publication Date: 2015-11-25
BEIJING QIHOO TECH CO LTD +1
View PDF4 Cites 25 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For an HTML page, only its ID value is unique among the basic attributes of an element, but in reality, many page elements do not have this attribute (ID value), which makes it difficult to accurately locate each element, and it is easy for elements to fail to locate Case
[0008] 3) It only supports the parsing of HTML pages, and there is no logic for building object libraries
[0009] According to the above description, it can be seen that the existing technology HTMLParser cannot effectively complete the automatic identification and positioning of page elements, and cannot automatically build a page element object library, so it cannot realize real UI automation testing

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • User interface element object identification and automatic test method and apparatus
  • User interface element object identification and automatic test method and apparatus
  • User interface element object identification and automatic test method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0026] Embodiment 1, user interface element object recognition method, see figure 1 The user interface element object recognition method described in this embodiment specifically includes:

[0027] S100. Analyzing the user interface to acquire attribute information of the element object;

[0028] This embodiment needs to obtain the attribute information of the element object when parsing a given user interface. The attribute information of the element object described in this embodiment includes three categories: the basic attribute of the element object, the custom attribute of the element object, and the element object in the document. The path information in , that is, XPath information. For an HTML element object, it contains basic attributes and custom attributes. Among them, the basic attributes of the element object include Id, Name, Class, Css, Value, etc.; the custom attributes of the element object are generally to meet some special requirements of the developer. T...

Embodiment 2

[0059] Embodiment 2, user interface element object recognition device, combined below image 3 The device of this embodiment will be described.

[0060] image 3 The shown device mainly includes: an analysis and acquisition unit 300 , a classification unit 310 , and a storage unit 320 . The classification unit 310 is connected to the analysis and acquisition unit 300 and the storage unit 320 . Wherein, the parsing and obtaining unit 300 further includes: a traverse and mark subunit 3010 and a storage subunit 3020 .

[0061] Wherein, the parsing and obtaining unit 300 is mainly suitable for parsing the user interface and obtaining attribute information of element objects;

[0062] In this embodiment, when analyzing a given user interface, the analysis and acquisition unit 300 acquires attribute information of element objects. The attribute information of element objects in this embodiment includes three types: basic attributes of element objects, custom attributes of element...

Embodiment 3

[0073] Embodiment 3, a method for automated testing of a user interface. Combine below Figure 4 The method of this embodiment will be described.

[0074] figure 1 In, S400, analyze the user interface, and obtain the attribute information of the element object;

[0075] This embodiment needs to obtain the attribute information of the element object when parsing a given user interface. The attribute information of the element object described in this embodiment includes three categories: the basic attribute of the element object, the custom attribute of the element object, and the element object in the document. The path information in , that is, XPath information. For an HTML element object, it contains basic attributes and custom attributes. Among them, the basic attributes of the element object include Id, Name, Class, Css, Value, etc.; the custom attributes of the element object are generally to meet some special requirements of the developer. The required "key-value", ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The present invention discloses a user interface element object identification and automatic test method and apparatus. The user interface element object identification method comprises: performing analysis on a user interface, and acquiring attribute information of an element object; performing classification on the element object according to a set classification rule to determine the category of an element; and storing the element object subjected to the classification, and completing identification of the element of the user interface. According to the user interface element object identification and automatic test method and apparatus provided by the embodiment of the present invention, rapid and accurate identification and unified management of the element object are facilitated, automatic identification of the element object of the user interface is implemented without the need for artificial participation, and support is provided for an automatic test of the user interface.

Description

technical field [0001] The invention relates to user interface testing technology, in particular to a method and device for user interface element object recognition and automatic testing. Background technique [0002] The task of UI (UserInterface, user interface) automated testing is to find the page element object and obtain the basic properties and methods of the element object, and then simulate the manual test steps to operate the element object. UI automation testing is divided into three parts: identification and positioning of page elements, element information acquisition, and business logic automation. At present, in the process of UI automation testing, there are relatively good technical support for element information acquisition and business logic automation, but the identification and positioning of page elements still need to be done manually, which makes it impossible for UI automation testing to form a general tool. True automation cannot be achieved. ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
Inventor 王艳丽石峰
Owner BEIJING QIHOO TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products