CN107291438B - Automatic script generation method and device and electronic equipment - Google Patents

Automatic script generation method and device and electronic equipment Download PDF

Info

Publication number
CN107291438B
CN107291438B CN201610228789.5A CN201610228789A CN107291438B CN 107291438 B CN107291438 B CN 107291438B CN 201610228789 A CN201610228789 A CN 201610228789A CN 107291438 B CN107291438 B CN 107291438B
Authority
CN
China
Prior art keywords
control
interface
script
user interface
acquiring
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.)
Active
Application number
CN201610228789.5A
Other languages
Chinese (zh)
Other versions
CN107291438A (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.)
Zhejiang Tmall Technology Co 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 CN201610228789.5A priority Critical patent/CN107291438B/en
Publication of CN107291438A publication Critical patent/CN107291438A/en
Application granted granted Critical
Publication of CN107291438B publication Critical patent/CN107291438B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a method and a device for generating an automation script and electronic equipment, and a method and a device for running the automation script and the electronic equipment. The method for generating the automation script comprises the following steps: acquiring an operation logic code written for the operation of the automation script to be generated; acquiring interface configuration parameters according to which a user interface is generated; and generating an automation script for the operation of the automation script to be generated according to the operation logic code, the interface configuration parameters and a pre-developed user interface template. By adopting the method provided by the application, the user interface can be prevented from being directly developed, the development process of the automatic script is simplified, and the codes to be compiled are greatly reduced, so that the effects of reducing the development workload, liberating developers and improving the research and development efficiency are achieved.

Description

Automatic script generation method and device and electronic equipment
Technical Field
The application relates to the technical field of automatic operation, in particular to a method for generating an automatic script; corresponding to the method, the application also relates to a device for generating the automation script and the electronic equipment, and a method, a device and the electronic equipment for operating the automation script.
Background
With the continuous development of computer and internet technologies, some internet service providers have introduced an automated operation platform that can implement a function of converting regular and repetitive operations of users into automated operations. For example, automatic shelving and shelving of commodities, automatic pushing of messages, automatic tracking of commodity effects, automatic collection of information, automatic management of system resources, automatic downloading of pictures, automatic picture processing, and the like in an e-commerce transaction system. Through the automation operation platform change manual operation into automation mechanized operation, reduction manual work load that can be very big to reach and practice thrift the cost of labor, improve the effect of operation efficiency.
The traditional automatic script development method comprises the following steps: the developer first creates a user interface for controlling the execution of the automation script and then proceeds with the encoding of the operating logic. This development approach requires developers to develop individual user interfaces for each automation script, with the amount of code involved in a user interface typically being on the order of thousands of lines, or even more. Therefore, the traditional method has the disadvantages of long time consumption and large workload for developing the automation script, and particularly, the automation script needs to be reissued after the user interface is modified.
In summary, the prior art has a problem of requiring separate development of a user interface for each automation script.
Disclosure of Invention
The application provides a method for generating automation scripts, and aims to solve the problem that in the prior art, a user interface needs to be developed for each automation script. The application also provides a device for generating the automation script and the electronic equipment, and a method, a device and the electronic equipment for running the automation script.
The application provides a method for generating an automation script, which comprises the following steps:
acquiring an operation logic code written for the operation of the automation script to be generated;
acquiring interface configuration parameters according to which a user interface is generated;
and generating an automation script for the operation of the automation script to be generated according to the operation logic code, the interface configuration parameters and a pre-developed user interface template.
Alternatively to this, the first and second parts may,
the operation of the automatic script to be generated comprises interface operation;
the operation logic code comprises logic code corresponding to a control in the interface;
the logic code corresponding to the control in the interface is generated by adopting the following steps:
acquiring the control type attribute of the control according to a control identifier preset for the control and a mapping relation set between the control identifier and the control attribute generated in advance; determining a pre-packaged script function corresponding to the interface according to the interface type of the interface;
acquiring an action preset for the control type according to the control type attribute and the determined script function;
and forming the logic code corresponding to the control in the interface by taking the control identification, the mapping relation set, the acquired preset action and the interface identification of the interface as parameters of the script function.
Optionally, the parameter form of the script function includes a natural language form.
Optionally, the mapping relation set is generated by the following steps:
acquiring a control and control attributes included in an interface through a preset control grabbing tool;
setting the control identification for each acquired control;
and forming a mapping relation between the control identification and the control attribute of each control according to the set control identification, and forming the mapping relation of each control into the mapping relation set.
Optionally, the step of obtaining the control and the control attribute included in the interface through a preset control grabbing tool includes:
acquiring a control handle at the current mouse position through an application program interface of an operating system;
acquiring a control object at the current mouse position according to the control handle;
acquiring a control at the current mouse position according to the control object;
and reading each attribute of the control at the current mouse position.
Optionally, the interface type to which the interface belongs includes a web page type or a window type.
Optionally, the operating logic code includes logic code written according to a pre-packaged script function.
Optionally, the parameter form of the pre-packaged script function includes a natural language form.
Optionally, the method further includes:
and debugging the automation script according to the exception thrown by the pre-packaged script function when the automation script runs.
Correspondingly, the present application further provides an automatic script generating device, including:
the operation logic code acquisition unit is used for acquiring operation logic codes compiled for the operation of the automation script to be generated;
the interface configuration parameter acquisition unit is used for acquiring interface configuration parameters according to which the user interface is generated;
and the automatic script generating unit is used for generating an automatic script for the operation of the automatic script to be generated according to the operation logic code, the interface configuration parameters and a pre-developed user interface template.
Optionally, the operation of the automation script to be generated includes an interface operation; the operation logic code comprises logic code corresponding to a control in the interface; the device further comprises:
the control logic code generating unit is used for generating the logic code corresponding to the control in the interface;
the control logic code generating unit comprises:
the control type attribute acquiring subunit is used for acquiring the control type attribute of the control according to a control identifier preset for the control and a mapping relation set between the control identifier and the control attribute generated in advance;
the script function determining subunit is used for determining a pre-packaged script function corresponding to the interface according to the interface type to which the interface belongs;
the action obtaining subunit is used for obtaining an action preset for the control type according to the control type attribute and the determined script function;
and the control logic code generating subunit is used for taking the control identifier, the mapping relation set, the acquired preset action and the interface identifier of the interface as parameters of the script function to form the logic code corresponding to the control in the interface.
Optionally, the method further includes:
a mapping relation set generating unit, configured to generate the mapping relation set;
the mapping relation set generating unit includes:
the control and control attribute acquisition subunit is used for acquiring the control and control attribute included in the interface through a preset control grabbing tool;
the control identification setting subunit is used for setting the control identification for each acquired control;
and the mapping relation set generating subunit is used for forming the mapping relation between the control identification and the control attribute of each control according to the set control identification, and forming the mapping relation of each control into the mapping relation set.
Optionally, the control and control attribute obtaining subunit includes:
the handle acquiring subunit is used for acquiring a control handle at the current mouse position through an application program interface of the operating system;
the object acquisition subunit is used for acquiring the control object at the current mouse position according to the control handle;
the control acquiring subunit is used for acquiring the control at the current mouse position according to the control object;
and the attribute acquisition subunit is used for reading each attribute of the control at the current mouse position.
Correspondingly, the present application also provides an electronic device, comprising:
a display;
a processor; and
a memory for storing a program for implementing a method for generating an automation script, the apparatus being powered on and executing the program for implementing the method for generating the automation script by the processor, and performing the steps of: acquiring an operation logic code written for the operation of the automation script to be generated; acquiring interface configuration parameters according to which a user interface is generated; and generating an automation script for the operation of the automation script to be generated according to the operation logic code, the interface configuration parameters and a pre-developed user interface template.
Correspondingly, the application also provides an operation method of the automation script, which comprises the following steps:
acquiring interface configuration parameters of a user interface of an automation script to be run; and obtaining a user interface template;
generating the user interface according to the interface configuration parameters and the user interface template;
extracting operation parameter data and an object set to be operated from the user interface through a pre-registered component for acquiring script operation related data in the user interface;
and running the automation script according to the running parameter data, and processing each object to be operated included in the object set to be operated.
Optionally, before the extracting the operation parameter data and the data set to be operated from the user interface, the method further includes:
registering the component in the operating system.
Optionally, the operating system includes: a windowing operating system or a non-windowing operating system.
Optionally, the operating system is a windows operating system; registering the component in the operating system in the following way:
and registering the component into the window operating system in a COM component mode.
Optionally, the operating system is a non-windows operating system; registering the component in the operating system in the following way:
and registering the component into the non-window operating system in a configuration file mode.
Optionally, the interface configuration parameters include an operation parameter identifier, an attribute name of the object to be operated, and a script function identifier.
Correspondingly, this application still provides an automation script's running device, includes:
the interface configuration parameter acquisition unit is used for acquiring interface configuration parameters of a user interface of the automation script to be operated;
a user interface template obtaining unit, configured to obtain a user interface template;
the user interface generating unit is used for generating the user interface according to the interface configuration parameters and the user interface template;
the script operation related data acquisition unit is used for extracting operation parameter data and an object set to be operated from the user interface through a pre-registered component for acquiring script operation related data in the user interface;
and the automatic script execution unit is used for executing the automatic script according to the operation parameter data and processing each object to be operated included in the object set to be operated.
Optionally, the method further includes:
a component registration unit for registering the component in the operating system.
Correspondingly, the present application also provides an electronic device, comprising:
a display;
a processor; and
a memory for storing a program for implementing a method of running an automation script, the apparatus performing the following steps after being powered on and running the program for implementing the method of running the automation script by the processor: acquiring interface configuration parameters of a user interface of an automation script to be run; and obtaining a user interface template; generating the user interface according to the interface configuration parameters and the user interface template; extracting operation parameter data and an object set to be operated from the user interface through a pre-registered component for acquiring script operation related data in the user interface; and running the automation script according to the running parameter data, and processing each object to be operated included in the object set to be operated.
Compared with the prior art, the method for generating the automatic script provided by the application generates the automatic script of the operation according to the operation logic code, the interface configuration parameters and the pre-developed user interface template after compiling the operation logic code for the repeatable operation and setting the interface configuration parameters.
By using the method for generating the automation script, a universal user interface template is used when the automation script is developed, and only interface configuration parameters need to be set for a user interface; the processing mode avoids directly developing the user interface, simplifies the development process of the automatic script, and greatly reduces the codes to be compiled; therefore, the method for generating the automation script can effectively reduce development workload, liberate developers and improve research and development efficiency.
When the method provided by the application is used for generating the automatic script for the operation of the interface class, the control and the control attribute in the interface can be obtained through a preset control grabbing tool, the mapping relation set between the control identification and the control attribute is generated according to the control identification set for each control, and when the operation logic coding is carried out, a developer can directly operate the control in the mapping relation; the processing mode avoids positioning the control by analyzing the interface source code, simplifies the step of positioning the interface control, is not easy to make mistakes, and a user does not need to learn the interface development language; therefore, the method provided by the application can further effectively reduce the development cost and reduce the possibility of program errors.
In addition, the method provided by the application aggregates the same kind of automatic instructions of the script language in advance, highly packages the aggregated same kind of automatic instructions, highly packages a large amount of automatic instructions and then reduces the automatic instructions into a small amount of script function functions, and developers can bring the automatic instruction functions into the script function functions through the packaged automatic instructions in a natural language parameter mode during logic coding; the processing mode greatly simplifies the learning cost of the script language.
In addition, according to the method provided by the application, each packaged script function has a judgment function, if the function fails to be executed, an alarm is given immediately, and the execution process of the script is a code debugging process; by the processing mode, the script can be debugged without professional developers; therefore, the method provided by the application can further reduce the development cost.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one method or product of the embodiments of the present application.
Drawings
FIG. 1 is a flow diagram of an embodiment of a method for generating an automation script provided herein;
FIG. 2 is a flow diagram of a user interface of an embodiment of a method for generating an automation script provided herein;
FIG. 3 is a flow diagram of scripting logic code that generates an interface control according to an embodiment of a method for generating an automation script provided by the present application;
FIG. 4 is a flow diagram of a method for generating a set of mapping relationships according to an embodiment of a method for generating an automation script provided herein;
FIG. 5 is a schematic diagram of an embodiment of an automated script generation apparatus provided herein;
FIG. 6 is a detailed schematic diagram of an embodiment of an automated script generation apparatus provided herein;
fig. 7 is a schematic diagram of an embodiment of an electronic device provided in the present application.
FIG. 8 is a flow diagram of an embodiment of a method for executing an automation script provided herein;
FIG. 9 is a schematic diagram of an embodiment of an apparatus for executing an automation script provided herein;
FIG. 10 is a schematic diagram of an embodiment of yet another electronic device provided herein.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit and scope of this application, and it is therefore not limited to the specific implementations disclosed below.
The application provides a method and a device for generating an automation script and electronic equipment, and a method and a device for running the automation script and the electronic equipment. Details are described in the following examples one by one. For the convenience of understanding, before describing the embodiments, the technical solutions of the present application will be briefly described.
In the technical solution provided by the present application, the method for generating the automation script is usually implemented in a development module of an automation operation platform, and the method is related to developers; the running method of the automation script is usually implemented in a mobile APP module or a client module of an automation operation platform.
After a script developer writes an operation logic code of an operation for a specific operation and sets interface configuration parameters for a user interface, an automatic script can be generated for the operation according to the written operation logic code, the set interface configuration parameters and a pre-developed user interface template, the operation logic code and the interface configuration parameters of the automatic script are usually stored in a script server, and the user interface template is usually included in a mobile client (mobile APP) or a desktop client. After the generated automatic script is issued, the mobile device generates a user interface corresponding to the automatic script through the mobile client and the desktop through the desktop client, when the user interface is generated, the client needs to acquire interface configuration parameters firstly, then the user interface is generated according to the interface configuration parameters and a user interface template, when a user sets script operation parameters and adds an object to be operated in the user interface, the client extracts operation parameter data and an object set to be operated from the user interface through a pre-registered component for acquiring script operation related data in the user interface, and executes the automatic script according to the operation parameter data to process each object in the object set to be operated.
According to the technical scheme, when the automatic script is developed, a universal user interface template is used, only interface configuration parameters are required to be set for the user interface, and the user interface is not required to be developed. Only interface configuration parameters need to be set, so that the development process of the automatic script is simplified, and codes needing to be written are greatly reduced.
Next, examples of the present application will be described in detail. Please refer to fig. 1, which is a flowchart illustrating an embodiment of a method for generating an automation script according to the present application.
Before the method is implemented, namely: the method comprises the steps of obtaining operation logic codes compiled for operation of the automation script to be generated, obtaining interface configuration parameters according to which a user interface is generated, and developing a universal user interface template in advance before the automation script is generated for the operation of the automation script to be generated according to the operation logic codes, the interface configuration parameters and the pre-developed user interface template.
Through analysis and abstraction of user interfaces corresponding to different automation scripts under the traditional development method, the inventor finds that various user interfaces can be abstracted to include: the user interface template comprises four parts of an automation tool list, an execution operation list, a parameter configuration list and an operation object list. Based on the abstract, a universal user interface template can be designed and developed, and the difference of the user interfaces of different automation scripts in the execution operation list part, the parameter configuration list part and the operation object list part can be embodied according to interface configuration parameters respectively set for each user interface, and different user interfaces can be generated according to different interface configuration parameters.
Please refer to fig. 2, which is a schematic diagram of a user interface of an embodiment of a method for generating an automation script according to the present application. As can be seen from fig. 2, the user interface template includes one TreeView (tree view) and three listviews (list view), where the TreeView displays script tools developed by respective developers with script developers as tree nodes, the ListView displays execution buttons corresponding to respective function identifiers included in a selected script tool, the ListView displays script operation parameters configurable for the selected script tool, and the ListView displays attributes and data of operation objects. The interface configuration parameters of the present embodiment include: function identification of the automation script, script running parameter name and attribute name of the operation object.
After the user interface template is developed in advance, the template can be used for different automatic scripts, and the user interface does not need to be developed when the automatic scripts are compiled for various operations, so that the script development process is simplified. The development user interface template may be in a high level programming language such as C #.
After the user interface template is developed in advance, steps S101 to S105 described in fig. 1 may be executed to implement the method for generating the automation script provided in this embodiment, and each step is described in detail below.
Step S101: and acquiring an operation logic code written for the operation of the automation script to be generated.
The operation refers to a repeatable operation, such as goods loading and unloading, message pushing, goods effect tracking, information collection, system resource management, picture downloading, picture processing and the like. The operation may be an operation on the interface, or an operation unrelated to the interface, for example, the commodity shelf loading and shelf unloading are operations on the interface, and the picture downloading is an operation unrelated to the interface.
The operation logic code refers to a script code written by a script language and related to an operation process, for example, if the operation process of putting the commodity on shelf is to add attribute values to various attributes of the commodity according to a preset adding and writing sequence, the operation logic code of putting the commodity on shelf includes logic codes such as the attribute and the adding and writing sequence required to be added and written.
Scripting languages that may be employed to write automation scripts include, but are not limited to: scripting languages such as AutoIt, JavaScript, VBScript, etc. If the operation of the automation script to be generated relates to Windows interface operation, an AutoIt script language can be adopted, the language can perform automatic operation in Windows GUI (user interface), and simulated keystrokes, mouse movements, window/control operations and the like can be used in combination to realize automation tasks, which cannot be realized by other script languages or cannot be realized by reliable methods (such as VBScript and SendKeys).
Before this step is implemented, a script developer needs to write operation logic codes for the operation of the automation script to be generated. After the script developer writes the operation logic code, the operation logic code is submitted to an executor who executes the automatic script generation method of the application, and the executor can be a script generator. And after the executor acquires the operation logic code, the next step of acquiring the interface configuration parameters according to which the user interface is generated can be executed.
It should be noted that there is no definite front-back execution sequence for this step and the next step, and in the specific implementation, a script developer may also submit the interface configuration parameters to the executor first, and then submit the operation logic code to the executor, and this execution sequence does not affect the finally generated automation script, and there is no dependency relationship between these two steps.
Currently, when a script developer writes operation logic code, the script developer needs to use automation instructions (function instructions) provided by a script language. Because the automation instructions provided by the scripting language are very many, taking the AutoIt scripting language as an example, the language provides thousands of automation instructions, and therefore, the problems that the operation logic code is written in the prior art, the learning cost is huge, the development threshold is high, and non-professionals cannot learn by themselves exist.
In order to solve the problems of high learning cost and the like existing in the prior art for compiling operation logic codes, the method provided by the application aggregates the same type of automation instructions of the scripting language in advance before developers develop the automation scripts, highly packages the aggregated same type of automation instructions, reduces a large amount of automation instructions into a small amount of script function functions after highly packaging, and provides the highly packaged script function functions for the script developers to compile operation logic codes. Therefore, a script developer only needs to master a small amount of highly-packaged script function functions and does not need to learn a large amount of automatic instructions provided by the script language, and when programming operation logic codes, the automatic instruction functions can be brought in a parameter mode through the packaged script function functions, so that the learning cost of the script language is greatly simplified. In specific implementation, the parameter form of the packaged script function can be further set to be a natural language form, for example, a chinese parameter form.
Taking an auto it script language as an example, the language provides more than 2000 automation instructions, and highly encapsulates script function functions of 20 basic categories, such as a script function of a graphics processing category, a script function of a file operation category, a script function of an Office Excel category, a script function of an IE category, and the like, by aggregating instructions of the same category.
In this embodiment, the script program is written by adopting an AutoIt scripting language, and the form of the script function formed by encapsulating the IE-like automation instruction may be: j _ IE ("mapping relation set file of control identification and control attribute", "control identification", "operation type", "control value", "page object identification"), wherein J _ IE is a function name of a packaged IE type script function, and a parameter value of a third parameter "operation type" of the function is a specific automation instruction expressed in a chinese form, for example, for an input box element in a web page, the parameter value of the parameter includes "input" this parameter value; for the button elements in the web page, the parameter values of the parameters include a ' click ' parameter value, and developers only need to master various Chinese parameter values of a ' J _ IE function and an ' operation type ' when writing the operation logic code.
When the operation belongs to the operation on the interface, the operation logic code comprises logic code corresponding to a control in the interface. At present, when a script developer compiles an operation logic code for the operation on the interface, the script developer needs to analyze an interface source code to position a control in the interface; in the processing mode, developers need to master interface development language and need to manually position controls; therefore, in the prior art, the interface control is positioned, and the problems that the learning cost is huge, the development threshold is high, a non-professional person cannot get on the hand, and the positioning error is easy to occur exist.
In order to solve the problems of high learning cost, high error possibility and the like existing in the prior art for positioning the interface controls, the method provided by the application firstly generates the mapping relation between the control identification and the control attribute of each control in the interface, namely the mapping relation set, before a developer writes an operation logic code. When a developer writes logic codes corresponding to the controls in the interface, the developers can directly operate the controls in the mapping relation, the controls are prevented from being positioned by analyzing interface source codes, the steps of positioning the interfaces and the controls are simplified, errors are not easy to occur, and the developers do not need to learn interface development languages.
Please refer to fig. 3, which is a flowchart of a script logic code for generating an interface control according to an embodiment of the method for generating an automation script of the present application. In specific implementation, the logic code corresponding to the control in the interface may be generated by the following steps:
step S201: acquiring the control type attribute of the control according to a control identifier preset for the control and a mapping relation set between the control identifier and the control attribute generated in advance; and determining a pre-packaged script function corresponding to the interface according to the interface type of the interface.
The control identification of the control is set by a script developer when the mapping relation set is generated, after the mapping relation set is generated, when the developer needs to position the control, the developer does not need to look up an interface source code, only needs to specify the control identification, and can obtain the control type attribute of the control according to the pre-generated mapping relation set between the control identification and the control attribute.
The control type attribute is an attribute for identifying a control type, for example, an element (i.e., control) type of an HTML web page element < input > is a text type.
The pre-generated mapping relationship set between the control identification and the control attribute comprises: and mapping relation between the control identification and the control attribute of each control in the interface.
Before this step is implemented, a mapping relation set between the control identification and the control attribute needs to be generated first. Please refer to fig. 4, which is a flowchart of an embodiment of a method for generating an automation script of the present application. In this embodiment, the set of mapping relationships may be generated by the following steps:
step S301: and acquiring the controls and the control attributes included in the interface through a preset control grabbing tool.
The process of obtaining the controls and the control attributes included in the interface through the control grabbing tool can comprise the following steps: 1) acquiring a control handle at the current mouse position through an application program interface (such as WINapi) of an operating system (for example, for each control in the interface, a mouse can be moved to the upper part of the control); 2) acquiring a control object at the current mouse position according to the control handle; 3) acquiring a control at the current mouse position according to the control object; 4) and reading each attribute of the control at the current mouse position.
Step S303: and setting the control identification for each acquired control.
After the control included in the interface is captured and each attribute of the control is acquired, a control identifier needs to be set for the control, and a developer can directly position the interface control through the control identifier, for example, the control identifier of the control (for example, the control name attribute value of the control is username) of an account name input box in a login page can be set as a "commodity name" that the developer can easily remember.
Step S305: and forming a mapping relation between the control identification and the control attribute of each control according to the set control identification, and forming the mapping relation of each control into the mapping relation set.
And forming a mapping relation between the control identification and the control attribute of the control by using the control identification and the control attribute of the control, wherein the mapping relation of each control forms the mapping relation set.
In particular implementations, the set of mapping relationships can be stored in a database for use by a developer in locating controls. Developers can directly operate controls in the pre-generated mapping relation, and the step of analyzing the source code is simplified.
So far, through steps S301 to S305, the embodiment of generating the mapping relationship set provided in this embodiment is described in detail.
In this step S201, a pre-packaged script function corresponding to the interface is further determined according to the interface type to which the interface belongs. For example, the interface type to which the web page belongs is an IE type interface, and the script function corresponding to the IE type interface may be _ J _ IE.
After the control type attribute of the control is obtained and the pre-packaged script function corresponding to the interface is determined, the next step can be carried out to obtain the action preset for the control type according to the control type attribute and the determined script function.
Step S203: and acquiring the action preset for the control type according to the control type attribute and the determined script function.
The action refers to an operation performed on the control, for example, if the control type attribute is a text type and the script function is a _ J _ IE, the action includes "input", "delete", and the like.
In order to simplify the step of writing the logic code corresponding to the control, the packager of the script function specifies a default action corresponding to the control type for each script function when packaging the script function. And obtaining the action preset for the control type according to the control type attribute obtained in the last step and the determined script function. For example, if the control type attribute is a text type and the script function is a _ J _ IE, the preset action may be an "enter" action.
Step S205: and forming the logic code corresponding to the control in the interface by taking the control identification, the mapping relation set, the acquired preset action and the interface identification of the interface as parameters of the script function.
In this step, the control identifier, the mapping relation set, the acquired preset action, and the interface identifier of the interface are used as parameters of the script function to form the logic code corresponding to the control in the interface. For example, the logical code generated for the account name input box control included in the login page may be: jj _ IE ("control identification and mapping relationship set file of control properties", "account name", "input", "zhang" and $ IE).
So far, through steps S201 to S205, the embodiment of generating the logic code corresponding to the control in the interface provided in this embodiment is described in detail.
The following gives an operation logic code generated by applying the method provided by the embodiment of the present application, taking a login operation of a login page as an example, so as to intuitively explain the effect achieved by applying the method provided by the embodiment of the present application. The generated operation logic code is as follows:
Local$ie=J_IE_Create("www.taobao.com/login.html")
local $ res1 ═ J _ IE ("Local", "login input box", "input", "zhang" and $ie)
Local $ res2 ═ J _ IE ("Local", "password entry box", "analog input", "abbk35kd", $ IE)
Local $ res3 ═ J _ IE ("Local", "login button", "click", $ie)
The code J _ IE _ Create ("www.taobao.com/login. html") is used to Create an IE window and open the www.taobao.com/login. html page, declaring a local variable named $ IE, which is used to represent the page object when loading the object of the newly created browser; the code J _ IE (a ' logic ', ' login input box ', ' input ', ' Zhang three ', ' Iphie) corresponds to the ordinary input operation of the account name, and successfully returns to 1, and fails to return to 0; the codes J _ IE ("login", "password input box", "analog input", "abbk35kd", and $ IE) simulate the operation of a mouse and a keyboard, successfully return to 1, and fail to return to 0; the code J _ IE ("login", "login button", "click", $ IE) corresponds to a normal click button operation, and since the button control does not need to input data, the value parameter is "to indicate no input", successfully returns to 1, and fails to return to 0.
Step S103: and acquiring interface configuration parameters according to which the user interface is generated.
The user interface is an interface used for controlling the operation of the automatic script and used by a user. Because the user interface of the application is generated according to the user interface template and the interface configuration parameters, the interface configuration parameters also need to be acquired when the automatic script is generated.
The interface configuration parameters include, but are not limited to: and (3) identifying each running parameter (such as a running parameter name) for controlling the running of the script and the attribute name of the operation object.
Before this step is implemented, the script developer needs to set interface configuration parameters for the user interface. After the script developer sets the interface configuration parameters, the interface configuration parameters are submitted to an executor executing the automatic script generation method. And after the executor acquires the operation logic code and the interface configuration parameters, the executor can enter the next step to generate an automatic script for the operation.
Step S105: and generating an automation script for the operation of the automation script to be generated according to the operation logic code, the interface configuration parameters and a pre-developed user interface template.
After the operation logic code and the interface configuration parameter are obtained, an automatic script can be generated for the operation according to the operation logic code, the interface configuration parameter and a pre-developed user interface template.
In particular implementations, the operational logic code and interface configuration parameters are typically stored in a script server, and the user interface template is typically included in a mobile client or a desktop client.
In the prior art, only professional developers who master automation instructions can debug automation scripts for operation logic codes written directly according to the automation instructions provided by a scripting language. Therefore, the problem that the workload is large and the debugging difficulty is high exists in the prior art for debugging the automation script.
In order to reduce the workload of script debugging and the debugging difficulty, the method provided by the application debugs the automatic script according to the exception thrown by the script function when the automatic script is operated.
In specific implementation, a highly-encapsulated script function provided for a script developer can have a judgment function, if the function fails to be executed, an alarm can be given to the developer in an abnormal throwing mode, and the thrown specific abnormal information can be used as debugging guide information to guide the developer to modify the automatic script. By adopting the processing mode, the execution process of the script is the process of debugging the code, so that the effect of debugging the script without professional developers can be achieved.
In the foregoing embodiment, a method for generating an automation script is provided, and correspondingly, an apparatus for generating an automation script is also provided. The apparatus corresponds to an embodiment of the method described above.
Please refer to fig. 5, which is a schematic diagram of an embodiment of an automatic script generation apparatus of the present application. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
An automatic script generation device of this embodiment includes: an operation logic code obtaining unit 101 configured to obtain an operation logic code written for an operation of an automation script to be generated; an interface configuration parameter obtaining unit 103, configured to obtain an interface configuration parameter according to which a user interface is generated; and the automatic script generating unit 105 is configured to generate an automatic script for the operation of the automatic script to be generated according to the operation logic code, the interface configuration parameter, and a pre-developed user interface template.
Please refer to fig. 6, which is a detailed schematic diagram of an embodiment of an automated script generation apparatus according to the present application. Optionally, the operation of the automation script to be generated includes an interface operation; the operation logic code comprises logic code corresponding to a control in the interface; the device further comprises:
a control logic code generating unit 201, configured to generate the logic code corresponding to the control in the interface;
the control logic code generating unit 201 includes:
the control type attribute acquiring subunit is used for acquiring the control type attribute of the control according to a control identifier preset for the control and a mapping relation set between the control identifier and the control attribute generated in advance;
the script function determining subunit is used for determining a pre-packaged script function corresponding to the interface according to the interface type to which the interface belongs;
the action obtaining subunit is used for obtaining an action preset for the control type according to the control type attribute and the determined script function;
and the control logic code generating subunit is used for taking the control identifier, the mapping relation set, the acquired preset action and the interface identifier of the interface as parameters of the script function to form the logic code corresponding to the control in the interface.
Optionally, the method further includes:
a mapping relation set generating unit 203, configured to generate the mapping relation set;
the mapping relationship set generating unit 203 includes:
a control and control attribute acquiring subunit 2031, configured to acquire, through a preset control grasping tool, a control and control attribute included in the interface;
a control identifier setting subunit 2033, configured to set the control identifier for each acquired control;
a mapping relationship set generating subunit 2035, configured to form, according to the set control identifier, a mapping relationship between the control identifier and the control attribute of each control, and form the mapping relationship of each control into the mapping relationship set.
Optionally, the control and control attribute obtaining subunit 2031 includes:
the handle acquiring subunit is used for acquiring a control handle at the current mouse position through an application program interface of the operating system;
the object acquisition subunit is used for acquiring the control object at the current mouse position according to the control handle;
the control acquiring subunit is used for acquiring the control at the current mouse position according to the control object;
and the attribute acquisition subunit is used for reading each attribute of the control at the current mouse position.
Please refer to fig. 7, which is a schematic diagram of an electronic device according to an embodiment of the present application. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
An electronic device of the present embodiment includes: a display 101; a processor 102; and a memory 103 for storing a program for implementing a method for generating an automation script, the apparatus being powered on and executing the program for implementing the method for generating the automation script by the processor, and performing the steps of: acquiring an operation logic code written for the operation of the automation script to be generated; acquiring interface configuration parameters according to which a user interface is generated; and generating an automation script for the operation of the automation script to be generated according to the operation logic code, the interface configuration parameters and a pre-developed user interface template.
According to the method for generating the automation script, after the operation logic code is compiled for the repeatable operation and the interface configuration parameter is set, the automation script of the operation is generated according to the operation logic code, the interface configuration parameter and the pre-developed user interface template. By using the method for generating the automatic script, when the automatic script is developed, only interface configuration parameters need to be set for the user interface, the user interface is not required to be developed, the development process of the automatic script is simplified, and codes needing to be compiled are greatly reduced; therefore, the method for generating the automation script can effectively reduce development workload, liberate developers and improve research and development efficiency.
Corresponding to the automatic script generation method, the application also provides an automatic script running method. Please refer to fig. 8, which is a flowchart illustrating an embodiment of a method for running an automation script according to the present application, where details of the same portion as that of the first embodiment are not repeated, and please refer to corresponding portions in the first embodiment. The application provides an automatic script operation method, which comprises the following steps:
step S101: acquiring interface configuration parameters of a user interface of an automation script to be run; and obtaining the user interface template.
The interface configuration parameters include, but are not limited to: and the running parameter identifiers are used for controlling the running of the script, the attribute name of the object to be operated and the script function identifier.
The interface configuration parameters are usually stored in the script server together with the operation logic code of the automation script, and the step of obtaining the interface configuration parameters of the user interface of the automation script to be run may specifically be: firstly, sending an interface configuration parameter request corresponding to the automation script to be operated to a script server; after receiving the interface configuration parameter request, the server end returns the interface configuration parameter to the requesting party; and the requesting party receives the interface configuration parameters returned by the server.
To implement the method for running the automation script provided by the present application, a user interface template also needs to be acquired. The user interface template is usually included in a mobile client or a desktop client, and the user interface template can be acquired when the client is started.
Step S103: and generating the user interface according to the interface configuration parameters and the user interface template.
After the interface configuration parameters and the user interface template are obtained, the user interface used by the user and used for controlling the operation of the automation script can be generated according to the interface configuration parameters and the user interface template.
In particular implementation, each interface configuration parameter may be populated at a corresponding location of the user interface template. As can be seen from fig. 2 in the first embodiment, the "wang binding information", "picture path", "sending delay", and "sending type" displayed in the "parameter configuration" part of the generated user interface all belong to the names of the operating parameters; the "prosperous name", "transmission state", and the like displayed in the "data list" section are attribute names of the operation targets; the buttons such as "bind strong" and "send picture" displayed in the "execute operation" section are execution buttons corresponding to the respective function identifiers included in the selected script tool.
Step S105: and extracting operation parameter data and an object set to be operated from the user interface through a pre-registered component for acquiring script operation related data in the user interface.
And the pre-registered component for acquiring script operation related data in the user interface is used for extracting operation parameter data and an object set to be operated from the user interface.
After the user interface is generated, the user can add the object to be operated, set the attribute value of the operation parameter and the like through the interface. When a user clicks an execution button of a certain function identifier, the operation parameter data (namely, the parameter name and the parameter value of the operation parameter) and the object set to be operated can be extracted from the user interface through the pre-registered component.
For example, the to-be-run automation script is an automation script for goods shelving operation, and the to-be-operated object acquired by the component includes a plurality of goods to be shelved.
To use the component, the component needs to be registered in the operating system before executing the method provided by the present application.
The operating system includes: a windowing operating system or a non-windowing operating system. If the operating system is a window operating system, the component can be registered in the window operating system in a COM component mode; if the operating system is a non-window operating system, the component can be registered in the non-window operating system in a configuration file mode.
Step S107: and running the automation script according to the running parameter data, and processing each object to be operated included in the object set to be operated.
After the operation parameter data and the object set to be operated are obtained through the building, the execution mode of the automatic script can be controlled according to the operation parameter data, and each object to be operated included in the object set to be operated is processed through the execution of the automatic script.
In the foregoing embodiment, an operation method of an automation script is provided, and correspondingly, the present application also provides an operation device of an automation script. The apparatus corresponds to an embodiment of the method described above.
Please refer to fig. 9, which is a schematic diagram of an embodiment of an apparatus for executing an automation script of the present application. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
An automation script running device of this embodiment includes: an interface configuration parameter obtaining unit 101, configured to obtain an interface configuration parameter of a user interface of an automation script to be run; a user interface template acquisition unit 103, configured to acquire a user interface template; a user interface generating unit 105, configured to generate the user interface according to the interface configuration parameters and the user interface template; a script operation related data acquiring unit 107, configured to extract operation parameter data and a set of objects to be operated from the user interface through a pre-registered component for acquiring script operation related data in the user interface; and the automatic script execution unit 109 is configured to execute the automatic script according to the operation parameter data, and process each object to be operated included in the set of objects to be operated.
Optionally, the method further includes:
a component registration unit for registering the component in the operating system.
Please refer to fig. 10, which is a diagram illustrating another embodiment of an electronic device according to the present application. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
Another electronic device of the present embodiment includes: a display 101; a processor 102; and a memory 103 for storing a program for implementing an operation method of the automation script, wherein the following steps are executed after the device is powered on and the program for implementing the operation method of the automation script is executed by the processor: acquiring interface configuration parameters of a user interface of an automation script to be run; and obtaining a user interface template; generating the user interface according to the interface configuration parameters and the user interface template; extracting operation parameter data and an object set to be operated from the user interface through a pre-registered component for acquiring script operation related data in the user interface; and running the automation script according to the running parameter data, and processing each object to be operated included in the object set to be operated.
Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present application, therefore, the scope of the present application should be determined by the claims that follow.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
1. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
2. As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

Claims (21)

1. A method for generating an automation script, comprising:
acquiring an operation logic code written for the operation of the automation script to be generated;
acquiring interface configuration parameters according to which a user interface is generated;
generating an automation script for the operation of the automation script to be generated according to the operation logic code, the interface configuration parameter and a pre-developed user interface template;
the pre-developed user interface template comprises an execution operation list, a parameter configuration list and an operation object list; the interface configuration parameter is used for setting the execution operation list, the parameter configuration list and the operation object list;
the operation of the automatic script to be generated comprises interface operation;
the operation logic code comprises logic code corresponding to a control in the interface;
the logic code corresponding to the control in the interface is generated by adopting the following steps:
acquiring the control type attribute of the control according to a control identifier preset for the control and a mapping relation set between the control identifier and the control attribute generated in advance; determining a pre-packaged script function corresponding to the interface according to the interface type of the interface;
acquiring an action preset for the control type according to the control type attribute and the determined script function;
and forming the logic code corresponding to the control in the interface by taking the control identification, the mapping relation set, the acquired preset action and the interface identification of the interface as parameters of the script function.
2. The method of claim 1, wherein the parametric form of the script function comprises a natural language form.
3. The method of generating an automation script of claim 1, wherein the set of mapping relationships is generated by:
acquiring a control and control attributes included in an interface through a preset control grabbing tool;
setting the control identification for each acquired control;
and forming a mapping relation between the control identification and the control attribute of each control according to the set control identification, and forming the mapping relation of each control into the mapping relation set.
4. The method for generating the automation script according to claim 3, wherein the step of obtaining the controls and the control attributes included in the interface through a preset control grabbing tool comprises:
acquiring a control handle at the current mouse position through an application program interface of an operating system;
acquiring a control object at the current mouse position according to the control handle;
acquiring a control at the current mouse position according to the control object;
and reading each attribute of the control at the current mouse position.
5. The method for generating an automation script as claimed in claim 1, wherein the interface type to which the interface belongs includes a web page type or a window type.
6. The method of claim 1, wherein the operational logic code comprises logic code written according to a pre-packaged script function.
7. The method of claim 6, wherein the parametric form of the pre-packaged script function comprises a natural language form.
8. The method for generating an automation script as claimed in claim 6, further comprising:
and debugging the automation script according to the exception thrown by the pre-packaged script function when the automation script runs.
9. An apparatus for generating an automation script, comprising:
the operation logic code acquisition unit is used for acquiring operation logic codes compiled for the operation of the automation script to be generated;
the interface configuration parameter acquisition unit is used for acquiring interface configuration parameters according to which the user interface is generated;
the automatic script generating unit is used for generating an automatic script for the operation of the automatic script to be generated according to the operation logic code, the interface configuration parameter and a pre-developed user interface template;
the pre-developed user interface template comprises an execution operation list, a parameter configuration list and an operation object list; the interface configuration parameter is used for setting the execution operation list, the parameter configuration list and the operation object list;
the operation of the automatic script to be generated comprises interface operation; the operation logic code comprises logic code corresponding to a control in the interface; the device further comprises:
the control logic code generating unit is used for generating the logic code corresponding to the control in the interface;
the control logic code generating unit comprises:
the control type attribute acquiring subunit is used for acquiring the control type attribute of the control according to a control identifier preset for the control and a mapping relation set between the control identifier and the control attribute generated in advance;
the script function determining subunit is used for determining a pre-packaged script function corresponding to the interface according to the interface type to which the interface belongs;
the action obtaining subunit is used for obtaining an action preset for the control type according to the control type attribute and the determined script function;
and the control logic code generating subunit is used for taking the control identifier, the mapping relation set, the acquired preset action and the interface identifier of the interface as parameters of the script function to form the logic code corresponding to the control in the interface.
10. The apparatus for generating an automation script of claim 9, further comprising:
a mapping relation set generating unit, configured to generate the mapping relation set;
the mapping relation set generating unit includes:
the control and control attribute acquisition subunit is used for acquiring the control and control attribute included in the interface through a preset control grabbing tool;
the control identification setting subunit is used for setting the control identification for each acquired control;
and the mapping relation set generating subunit is used for forming the mapping relation between the control identification and the control attribute of each control according to the set control identification, and forming the mapping relation of each control into the mapping relation set.
11. The apparatus for generating an automation script according to claim 10, wherein the control and control property acquisition subunit includes:
the handle acquiring subunit is used for acquiring a control handle at the current mouse position through an application program interface of the operating system;
the object acquisition subunit is used for acquiring the control object at the current mouse position according to the control handle;
the control acquiring subunit is used for acquiring the control at the current mouse position according to the control object;
and the attribute acquisition subunit is used for reading each attribute of the control at the current mouse position.
12. An electronic device, comprising:
a display;
a processor; and
a memory for storing a program for implementing a method for generating an automation script, the apparatus being powered on and executing the program for implementing the method for generating the automation script by the processor, and performing the steps of: acquiring an operation logic code written for the operation of the automation script to be generated; acquiring interface configuration parameters according to which a user interface is generated; generating an automation script for the operation of the automation script to be generated according to the operation logic code, the interface configuration parameter and a pre-developed user interface template;
the pre-developed user interface template comprises an execution operation list, a parameter configuration list and an operation object list; the interface configuration parameter is used for setting the execution operation list, the parameter configuration list and the operation object list;
the operation of the automatic script to be generated comprises interface operation;
the operation logic code comprises logic code corresponding to a control in the interface;
the logic code corresponding to the control in the interface is generated by adopting the following steps:
acquiring the control type attribute of the control according to a control identifier preset for the control and a mapping relation set between the control identifier and the control attribute generated in advance; determining a pre-packaged script function corresponding to the interface according to the interface type of the interface;
acquiring an action preset for the control type according to the control type attribute and the determined script function;
and forming the logic code corresponding to the control in the interface by taking the control identification, the mapping relation set, the acquired preset action and the interface identification of the interface as parameters of the script function.
13. A method for running an automation script, comprising:
acquiring interface configuration parameters of a user interface of an automation script to be run; and obtaining a user interface template;
generating the user interface according to the interface configuration parameters and the user interface template;
extracting operation parameter data and an object set to be operated from the user interface through a pre-registered component for acquiring script operation related data in the user interface;
running the automation script according to the running parameter data, and processing each object to be operated included in the object set to be operated;
the user interface template comprises an execution operation list, a parameter configuration list and an operation object list; the interface configuration parameters are used for setting the execution operation list, the parameter configuration list and the operation object list.
14. The method for executing automation script as recited in claim 13, further comprising, before the extracting the operation parameter data and the data set to be operated from the user interface:
registering the component in an operating system.
15. The method of claim 14, wherein the operating system comprises: a windowing operating system or a non-windowing operating system.
16. The method of claim 14, wherein the operating system is a windows operating system; registering the component in the operating system in the following way:
and registering the component into the window operating system in a COM component mode.
17. The method of claim 14, wherein the operating system is a non-windows operating system; registering the component in the operating system in the following way:
and registering the component into the non-window operating system in a configuration file mode.
18. The method according to claim 14, wherein the interface configuration parameters include an operation parameter identifier, a property name of the object to be operated, and a script function identifier.
19. An apparatus for executing an automation script, comprising:
the interface configuration parameter acquisition unit is used for acquiring interface configuration parameters of a user interface of the automation script to be operated;
a user interface template obtaining unit, configured to obtain a user interface template;
the user interface generating unit is used for generating the user interface according to the interface configuration parameters and the user interface template; the script operation related data acquisition unit is used for extracting operation parameter data and an object set to be operated from the user interface through a pre-registered component for acquiring script operation related data in the user interface;
the automatic script execution unit is used for executing the automatic script according to the operation parameter data and processing each object to be operated in the object set to be operated;
the pre-developed user interface template comprises an execution operation list, a parameter configuration list and an operation object list; the interface configuration parameters are used for setting the execution operation list, the parameter configuration list and the operation object list.
20. The apparatus for executing an automation script of claim 19, further comprising:
and the component registration unit is used for registering the component in the operating system.
21. An electronic device, comprising:
a display;
a processor; and
a memory for storing a program for implementing a method of running an automation script, the apparatus performing the following steps after being powered on and running the program for implementing the method of running the automation script by the processor: acquiring interface configuration parameters of a user interface of an automation script to be run; and obtaining a user interface template; generating the user interface according to the interface configuration parameters and the user interface template; registering the components in an operating system through the pre-registered components for acquiring script operation related data in the user interface, and extracting operation parameter data and an object set to be operated from the user interface; running the automation script according to the running parameter data, and processing each object to be operated included in the object set to be operated;
the pre-developed user interface template comprises an execution operation list, a parameter configuration list and an operation object list; the interface configuration parameters are used for setting the execution operation list, the parameter configuration list and the operation object list.
CN201610228789.5A 2016-04-13 2016-04-13 Automatic script generation method and device and electronic equipment Active CN107291438B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610228789.5A CN107291438B (en) 2016-04-13 2016-04-13 Automatic script generation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610228789.5A CN107291438B (en) 2016-04-13 2016-04-13 Automatic script generation method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN107291438A CN107291438A (en) 2017-10-24
CN107291438B true CN107291438B (en) 2021-09-24

Family

ID=60093831

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610228789.5A Active CN107291438B (en) 2016-04-13 2016-04-13 Automatic script generation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN107291438B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109901828A (en) * 2017-12-09 2019-06-18 英业达科技有限公司 To operate the system and method for the automatized script of snapshot editor other devices
CN108170415B (en) * 2017-12-21 2021-01-22 博康智能信息技术有限公司 Light application program creating method based on configurable control
CN108282518A (en) * 2017-12-26 2018-07-13 阿里巴巴集团控股有限公司 A kind of customer terminal webpage generation method and device
CN108170809B (en) * 2017-12-28 2020-11-03 平安科技(深圳)有限公司 Table building script generation method, device, equipment and computer readable storage medium
CN108536492B (en) * 2018-04-08 2021-09-07 武汉斗鱼网络科技有限公司 Method, device, equipment and storage medium for acquiring attribute information of live broadcast room
CN108595656B (en) * 2018-04-28 2022-02-18 宁波银行股份有限公司 Data processing method and system
CN108710489A (en) * 2018-05-23 2018-10-26 中国平安人寿保险股份有限公司 Automate derivative scenario generation method, device, computer equipment
CN109101231B (en) * 2018-08-07 2022-09-23 百度在线网络技术(北京)有限公司 Script code generation method and device, computer equipment and storage medium
CN111104154A (en) * 2018-10-25 2020-05-05 长沙博为软件技术股份有限公司 Method for realizing script function extension and customization of big data acquisition system based on data processing service
CN109542553A (en) * 2018-10-26 2019-03-29 北京慧流科技有限公司 The information extraction method and device and storage medium of user interface UI element
CN109542539A (en) * 2018-11-22 2019-03-29 郑州云海信息技术有限公司 The method and system of script argument in a kind of configuration Web system
CN109918069B (en) * 2019-01-16 2022-07-05 浙江蓝卓工业互联网信息技术有限公司 Interactive interface generation method and system applied to industrial Internet
CN110308897B (en) * 2019-06-28 2023-08-04 高斯贝尔数码科技股份有限公司 Script design method for infrared remote control
CN110825369A (en) * 2019-11-07 2020-02-21 四川长虹电器股份有限公司 Method for automatically generating codes based on java language
CN111142735B (en) * 2019-12-10 2021-06-29 深圳市优必选科技股份有限公司 Software page creating method and device, terminal equipment and storage medium
KR102385381B1 (en) * 2019-12-11 2022-04-11 스노우 주식회사 Method and system for generating script forcamera effect
CN113971059A (en) * 2020-07-22 2022-01-25 北京奇虎科技有限公司 Method, device, equipment and storage medium for recovering equipment connection state
CN115617322A (en) * 2022-09-29 2023-01-17 联通智网科技股份有限公司 Customized script running method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876895A (en) * 2009-04-28 2010-11-03 中国科学院计算技术研究所 Package integrated method of application software under grid computing environment
CN102402628B (en) * 2010-09-07 2016-03-09 无锡中感微电子股份有限公司 A kind of method and system generating SoC verification platform
CN103135976B (en) * 2011-11-30 2016-05-11 阿里巴巴集团控股有限公司 code automatic generation method and device
CN104252413B (en) * 2013-06-27 2018-06-05 阿里巴巴集团控股有限公司 A kind of automatized script generation method, apparatus and system
CN104423948B (en) * 2013-09-02 2018-01-02 阿里巴巴集团控股有限公司 Automatized script operation method and device
US9754303B1 (en) * 2013-10-03 2017-09-05 Ca, Inc. Service offering templates for user interface customization in CITS delivery containers
CN104317590B (en) * 2014-10-22 2017-12-12 中国建设银行股份有限公司 The method of embedded configuration system and embedded configuration audit flow

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Developing, Verifying, and Maintaining High-Quality Automated Test Scripts";Vahid Garousi 等;《IEEE Software》;20160218;第33卷(第3期);第68-75页 *
"针对linux服务器交互式自动化脚本实现与研究";高佳林;《电子世界》;20160308(第5期);第125-126页 *

Also Published As

Publication number Publication date
CN107291438A (en) 2017-10-24

Similar Documents

Publication Publication Date Title
CN107291438B (en) Automatic script generation method and device and electronic equipment
US10169206B2 (en) Simultaneous multi-platform testing
US11755919B2 (en) Analytics for an automated application testing platform
US9021438B2 (en) Automatic framework for parallel testing on multiple testing environments
US9021442B2 (en) Dynamic scenario testing of web application
US9678726B1 (en) Automatic generation of plugins for development tools
US9384005B2 (en) Systems and methods for dynamic configuration of client-side development environments through use of application servers
US8615750B1 (en) Optimizing application compiling
US20140366005A1 (en) Abstract layer for automatic user interface testing
US9952835B2 (en) Generation of hybrid enterprise mobile applications in cloud environment
CN110543297B (en) Method and apparatus for generating source code
CN107015903B (en) Interface test program generation method and device and electronic equipment
Nguyen et al. An observe-model-exercise paradigm to test event-driven systems with undetermined input spaces
EP3333712A2 (en) Simultaneous multi-platform testing
Costa et al. Generating performance test scripts and scenarios based on abstract intermediate models
Gundecha et al. Selenium WebDriver 3 Practical Guide: End-to-end automation testing for web and mobile browsers with Selenium WebDriver
Ali et al. Automated parallel GUI testing as a service for mobile applications
Arlt et al. Trends in model-based gui testing
US20140359258A1 (en) Declarative Configuration Elements
US20220365758A1 (en) Tool for Introspection in Object-Oriented Source Code
Gundecha et al. Learn Selenium: Build data-driven test frameworks for mobile and web applications with Selenium Web Driver 3
Kozak et al. Three-module framework for automated software testing
CN113515441A (en) Application information acquisition method and system, electronic equipment and storage medium
Andrzejak et al. Confguru-A system for fully automated debugging of configuration errors
Kent Test automation: From record/playback to frameworks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211109

Address after: Room 507, floor 5, building 3, No. 969, Wenyi West Road, Wuchang Street, Yuhang District, Hangzhou City, Zhejiang Province

Patentee after: ZHEJIANG TMALL TECHNOLOGY Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: ALIBABA GROUP HOLDING Ltd.