Automatic script packaging method and device

An automatic script and automatic technology, applied in the computer field, can solve problems such as low maintainability, automation is not suitable for mass promotion, and many automated script codes, so as to reduce the amount of code and the difficulty of writing, improve maintainability, and reduce cost effect

Pending Publication Date: 2019-06-25
HUNDSUN TECH
View PDF4 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Existing methods for realizing UI automation usually realize the manual operation of replacing the interface with simulated operations by writing executable automation scripts. Most automation scripts identify and write different element types one by one in an object-oriented manner, and Encapsulate element operations one by one. When there are too many interface elements, this kind of writing method will cause the problem of many automated script codes, complex and poor maintainability. For example, see figure 1 The schematic diagram of the form interface is shown. The form includes many elements such as selection control, menu control, input control, and date control. The operation will lead to correspondingly more content of the script, and the writing process is more complicated, and the code with the same function (such as recognition function) in the script often appears repeatedly, which further causes code redundancy. In addition, the maintainability of this method is very low , when the interface information changes, it is often necessary to rewrite the script. These problems indirectly increase the cost of UI automation, which makes UI automation not suitable for mass promotion.

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
  • Automatic script packaging method and device
  • Automatic script packaging method and device
  • Automatic script packaging method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0070] Embodiment 1 of the present application provides a method for automatic script packaging, which will be described in detail below with reference to the accompanying drawings.

[0071] see figure 2 , which is a flow chart of a method for automatic script encapsulation provided in Embodiment 1 of the present application.

[0072] The method described in the embodiment of the present application includes the following steps:

[0073] S201: Obtain the element attribute of the element on the interface.

[0074] The interface refers to the user's operation interface, including the interface displayed by mobile APP, webpage, smart wearable device, etc., through the operation on the interface, the interaction process between people, equipment and software can be realized.

[0075] The elements are various controls on the interface, such as selection controls, menu controls, input controls, date controls, picture controls, and list controls.

[0076] The visible name of the ...

Embodiment 2

[0126] Based on the automatic script encapsulation method provided in the foregoing embodiments, Embodiment 2 of the present application further provides an automatic script encapsulation device, which will be described in detail below with reference to the accompanying drawings.

[0127] see image 3 , which is a structural diagram of an automatic script packaging device provided in Embodiment 2 of the present application.

[0128] The device described in this embodiment of the present application includes: a first acquisition unit 301 , a second acquisition unit 302 , a third acquisition unit 303 and an operation unit 304 .

[0129] The first obtaining unit 301 is configured to obtain element attributes of elements on the interface.

[0130] The element attribute is the code information added to the element in order to distinguish the elements when the code is written. Usually, the element attribute is not visible on the interface, and the elements on the interface can be c...

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 embodiment of the invention provides an automatic script packaging method. The method comprises: acquiring element attributes of elements on an interface; obtaining and caching an element name andan element type of eachelement according to the element attribute, wherein the element name is a visual name of the element on the interface; obtaining and caching an operation mode corresponding tothe element type; and automatically obtaining an element name matched with preset test data from the cached element names, and carrying out operation according to the operation mode. By utilizing themethod provided by the invention, the code quantity and the programming difficulty of the script can be effectively reduced, and the maintainability of the automatic script is improved, so that the investment cost required by UI automation is reduced. The embodiment of the invention further provides an automatic script packaging device, an electronic device and a storage medium.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to a method and device for automatic script packaging. Background technique [0002] UI (User Interface, User Interface) refers to a collection of interaction methods between users and certain systems. These systems not only refer to computer programs, but also include certain machines, equipment, and complex tools with specific functions. [0003] Existing methods for realizing UI automation usually realize the manual operation of replacing the interface with simulated operations by writing executable automation scripts. Most automation scripts identify and write different element types one by one in an object-oriented manner, and Encapsulate element operations one by one. When there are too many interface elements, this kind of writing method will cause the problem of many automated script codes, complex and poor maintainability. For example, see figure 1 The schemati...

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 HUNDSUN TECH
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