Disclosure of Invention
In view of the above, embodiments of the present invention provide a task processing method and apparatus based on a script, where by acquiring a task script written for a task, the method enables a target element of a target page to be identified when the task script is executed, so as to simulate operations such as clicking and inputting, without requiring manual operations, reduce labor cost, and improve office efficiency.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a script-based task processing method.
The task processing method based on the script comprises the steps of obtaining a task script written for a work task to be processed, wherein the task script is used for identifying target elements of a target page, simulating operation indicated by a workflow at the position of the identified target elements, wherein the workflow is used for realizing the work task, determining that the work task does not meet a set timing execution condition, and executing the task script on the target page to complete the work task.
The target page comprises a login page, corresponding target elements comprise an account name input box, a password input box and a login button, the target elements of the identification target page simulate operation indicated by a workflow at the position of the identified target elements, the operation comprises the steps of identifying the account name input box and the password input box of the login page, filling a set account name in the account name input box by using an input method, filling a set password in the password input box, identifying the login button of the login page, and clicking the login button by using a click method.
The target page comprises a task search page, corresponding target elements comprise a task search input box and a search button, the target elements for identifying the target page simulate operation indicated by a workflow at the position where the target elements are identified, the target elements comprise the task search input box for identifying the task search page, the task search input box is filled with set task numbers by using an input method, the search button for identifying the task search page is identified, and the search button is clicked by using a click method.
The target page comprises a task configuration page, corresponding target elements comprise a task name list, a task stage list and a creation button, the target elements of the target page are identified, operations indicated by a workflow are simulated at positions of the target elements, the operations comprise identifying the task name list of the task configuration page, selecting corresponding task names in the task name list by using a click method, the task configuration page is a page which is jumped to after clicking the search button, identifying the task stage list of the task configuration page, selecting corresponding task stages in the task stage list by using the click method, identifying the creation button of the task configuration page, and clicking the creation button by using the click method.
The target page comprises a task creation page, corresponding target elements comprise a personnel query input box and a submit button, the target elements of the target page are identified, operations indicated by a workflow are simulated at positions of the identified target elements, the target elements comprise personnel query input boxes of the task creation page are identified, set personnel identifiers are found in the personnel query input boxes, the task creation page is a page which is skipped to after clicking the search button or the creation button, the submit button of the task creation page is identified, and the submit button is clicked by using a clic k method.
The target element of the target page is identified, and operations indicated by a workflow are simulated at the position of the target element, wherein the target element comprises an creation type drop-down box for identifying the task creation page, a click method is used for selecting a corresponding creation type from the creation type drop-down boxes, a task description input box for identifying the task creation page is used for inputting task description information in the task description input box.
Optionally, the identifying the target element of the target page comprises identifying the target element of the target page according to the set element identification or style characteristics of the target element.
Optionally, the timed execution condition includes periodic execution of the task and the task parameter being a known quantity or a regular change.
Optionally, the task script is further used for starting a browser and opening the target page.
Optionally, the method further comprises the steps of determining that the work task meets the timing execution condition, and acquiring a timing script to trigger periodic execution of the task script on the target page by using the timing script.
Optionally, the task script is implemented based on puppeteer test frameworks or selenium test tools.
Optionally, after the step of executing the task script on the target page, the method further comprises visually displaying an execution result generated by executing the task script.
Optionally, the method further comprises configuring a unique element identifier for the target element, and writing the target element and the corresponding element identifier into a configuration file.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a script-based task processing device.
The task processing device based on the script comprises an acquisition module and an execution module, wherein the acquisition module is used for acquiring a task script written for a work task to be processed, the task script is used for identifying target elements of a target page, simulating operation indicated by a workflow at the position of the identified target elements, the workflow is used for realizing the work task, and the execution module is used for determining that the work task does not meet set timing execution conditions, executing the task script on the target page and completing the work task.
The task script is further used for identifying the account name input box and the password input box of the login page, filling a set account name in the account name input box by using an input method, filling a set password in the password input box, identifying the login button of the login page, and clicking the login button by using a click method.
Optionally, the target page comprises a task search page, the corresponding target elements comprise a task search input box and a search button, the task script is further used for identifying the task search input box of the task search page, filling a set task number in the task search input box by using an input method, and identifying the search button of the task search page, and clicking the search button by using a click method.
The task script is further used for identifying a task name list of the task configuration page, selecting a corresponding task name in the task name list by using a click method, wherein the task configuration page is a page which is jumped to after the search button is clicked, identifying a task stage list of the task configuration page, selecting a corresponding task stage in the task stage list by using the click method, and identifying a creation button of the task configuration page, and clicking the creation button by using the click method.
The task script is further used for identifying a personnel query input box of the task creation page, searching a set personnel identifier in the personnel query input box, wherein the task creation page is a page jumped to after clicking the search button or the creation button, identifying a submit button of the task creation page, and clicking the submit button by using a click method.
Optionally, the target element further comprises a creation type drop-down box and a task description input box, the task script is further used for identifying the creation type drop-down box of the task creation page, selecting a corresponding creation type in the creation type drop-down box by using a click method, identifying the task description input box of the task creation page, and inputting task description information in the task description input box by using an input method.
Optionally, the task script is further used for identifying the target element of the target page according to the set element identification or style characteristic of the target element.
Optionally, the timed execution condition includes periodic execution of the task and the task parameter being a known quantity or a regular change.
Optionally, the task script is further used for starting a browser and opening the target page.
Optionally, the device further comprises a timing processing module, which is used for determining that the work task meets the timing execution condition and acquiring a timing script so as to trigger the periodic execution of the task script on the target page by using the timing script.
Optionally, the task script is implemented based on puppeteer test frameworks or selenium test tools.
Optionally, the device further comprises a display module for visually displaying the execution result generated by executing the task script.
Optionally, the device further comprises a configuration module, which is used for configuring a unique element identifier for the target element and writing the target element and the corresponding element identifier into a configuration file.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided an electronic device.
The electronic equipment comprises one or more processors and a storage device, wherein the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the task processing method based on the script.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer-readable medium.
A computer readable medium of an embodiment of the present invention has stored thereon a computer program which, when executed by a processor, implements a script-based task processing method of an embodiment of the present invention.
The embodiment of the invention has the advantages that the task script written for the work task is obtained, so that the target element of the target page can be identified when the task script is executed, clicking, inputting and other operations are simulated, manual operations are not needed, the labor cost is reduced, and the office efficiency is improved. The automatic login function is realized by identifying an account name input box, a password input box and a login button on a login page, and simulating the actions of input and clicking at the identified position.
The automatic searching function is realized by identifying a task searching input box and a searching button on a task searching page and simulating the actions of input and clicking on the identified position. The automatic configuration function is realized by identifying a task name list, a task stage list and a creation button on a task configuration page and simulating the clicking action at the identified position. The function of automatically creating the task is realized by identifying the personnel query input box and the submit button on the task creation page and simulating the actions of query and clicking on the identified position.
By identifying the creation type drop-down box and the task description input box on the task creation page and simulating the actions of input and clicking at the identified position, the task with richer attributes can be created. And identifying the target element based on the element identification or the style characteristics, so that the position of the target element on the target page is conveniently positioned. By setting the timing execution conditions, the work tasks meeting the timing execution conditions can be periodically and regularly executed, and the office efficiency is further improved. When the work task starts to be executed, the browser is started through the task script, and the target page is opened, so that the subsequent work flow can be continued.
Based on puppeteer test frame or selenium test tool writes task script, can take the place of manual work volume a large amount, very big promotion work efficiency, release manpower resources reduces the human cost, and then can distribute more labours on the higher job post of degree of difficulty. Through visual display of the execution results, developers can conveniently know the execution conditions of the work tasks. By setting the unique element identification for the target element, the position of the target element on the target page can be conveniently identified subsequently.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The terms involved in the embodiments of the present invention are explained below.
Puppeteer is a node. Js package published by the Chrome development team to simulate Ch rome browser operation. It provides a series of APIs that control the behavior of the Chrome or Chrome browser through the DevTools Protocol protocol. puppeteer by default, the Chrome is started in headl ess mode, which does not show pages, and can also be configured to start in non-header mode.
API Application Programming Interface, application program interface. APIs are predefined functions that are intended to provide applications and developers the ability to access a set of routines based on certain software or hardware without having to access source code or understand the details of the internal operating mechanisms.
DevTools is a set of Web development and debugging tools built in the Chrome, and can be used for iterating, debugging and analyzing websites.
As described in the background art, in an office scenario, for a work content that needs to be periodically processed in batches, the repeatability is strong and the flow is complicated, the work content is usually processed manually. But the manual processing may result in waste of human resources, increase human costs, and affect office efficiency. Therefore, the embodiment of the invention provides a task processing method based on a script, which can greatly reduce labor cost and greatly improve office efficiency, and is described in detail below.
Example 1
FIG. 1 is a schematic diagram of the main steps of a script-based task processing method in accordance with an embodiment of the present invention. As shown in fig. 1, the task processing method based on script in the embodiment of the present invention mainly includes the following steps:
and step S101, acquiring a task script written for the work task to be processed. The work task has any one or more of the following characteristics of strong repeatability, complicated flow and periodical execution. In an embodiment, strong repeatability may mean that the execution frequency of the work task is greater than a set frequency threshold, and tedious flow may mean that the operation steps of the work task are greater than a set number.
For a work task to be processed, its workflow needs to be combed, and then a task script is written based on puppetee r test framework or selenium test tool. Wherein, the combing of the workflow is used for providing an integral logic framework for the writing of task scripts. The task script includes program code for identifying a target element of the target page and program code for simulating an operation indicated by the workflow at a location where the target element is identified. The operations herein include clicking, inputting, and the like.
When identifying the target element of the target page, the target element can be identified according to a preset element identification or style characteristic. For the mode of identifying the target element by using the element identifier, when programming the program code for realizing the target page, the unique element identifier is configured for the target element, and the target element and the corresponding element identifier are written into the configuration file. When the target element is identified, the corresponding target element can be determined by identifying the element identification of the target page and inquiring the configuration file according to the identified element identification.
In an embodiment, style characteristics may refer to CSS (CASCADING STYLE SHE ETS, cascading style sheet) styles of page elements, including input box styles, button styles, list styles, and the like. For the manner of identifying the target element using the style characteristics, that is, whether the target element of the target page has the specified style characteristics, if the specified style characteristics are satisfied, the target element may be identified as the corresponding target element. For example, if a target element satisfies the input box style, it may be identified as an input box.
In a preferred embodiment, the task script further includes program code for launching the browser to open the target page so that the target element of the target page can be subsequently identified and simulating the operation indicated by the workflow at the location where the target element was identified.
After the task script is written, the task script is saved, and when a work task is required to be executed, for example, a task execution instruction is received, the corresponding task script is obtained directly according to a task identifier carried in the task execution instruction.
Step S102, judging whether the work task meets the set timing execution condition, if not, executing step S103, otherwise, executing step S104. The timed execution condition includes periodic execution of the task, with the task parameters being of known quantity or regularly varying. The task parameters are known quantity, and each time the task script of the work task is executed, each task parameter contained in the task script does not need to be modified. The regular change of task parameters indicates that each time the task script of the work task is executed, the modification of the task parameters can be directly realized through the program codes.
The step is to judge whether the work task needs to be executed periodically or not, and judge whether the task parameters are of known quantity or change regularly or not. Wherein, the periodic execution is a specified period of repeated execution, such as a fixed time of day execution, a once-a-week execution, a once-a-month execution, etc. The regular change refers to that the change of the required task parameters has a fixed rule every time the task script is executed, such as increasing a fixed step size, decreasing a fixed step size, etc. every time the task script is executed.
The method comprises the steps of determining a working task, wherein the working task meets a timing execution condition if the working task needs to be periodically executed and the task parameter is a known quantity, meeting the timing execution condition if the working task needs to be periodically executed and the task parameter is an unknown quantity but regularly changes, and meeting the timing execution condition if the working task does not need to be periodically executed or the task parameter is an unknown quantity and the change is not regular.
And step S103, executing a task script on the target page to complete the work task. And for the work task which does not meet the timing execution condition, directly running a task script on the target page to complete the work task.
Step S104, acquiring a timing script to trigger periodic execution of the task script on the target page by using the timing script. For a work task which needs to be periodically executed and does not need to modify various task parameters when each execution is performed, and a work task which needs to be periodically executed and can modify task parameters through program codes when each execution is performed, a timing script can be written.
Wherein the timing script includes program code for enabling periodic execution. For the work task meeting the timing execution condition, a timing script needs to be acquired, and the timing script is used for triggering the automatic execution of the task script, so that the risk of missing execution due to manual maintenance is reduced.
Example two
Fig. 2 is a schematic flow diagram of a script-based task processing method according to yet another embodiment of the present invention. As shown in fig. 2, the script-based task processing method according to the embodiment of the present invention uses a login task as a work task to be processed, and mainly includes the following steps:
Step S201, acquiring task scripts written for login tasks. In this embodiment, the login task needs to be executed at eight am every day, and the account name and password required for login are fixed. For the login task, the work flow of carding is as follows, opening a browser, inputting a page website, entering a corresponding login page, inputting an account name and a password, clicking a login button, and completing login.
And writing a task script corresponding to the login task based on puppeteer test frameworks by combining the workflow. The task script comprises an address bar for starting the browser, identifying a first page of the browser, inputting a page address in the address bar, opening a program code of a login page, identifying an account name input box and a password input box in the login page, filling account names and passwords in the account name input box and the password input box respectively, identifying a login button in the login page, and clicking the login button.
The task script is filled with account names and passwords by using an input method, and the login button is clicked by using a click method. And after the task script is written, storing. When a task execution instruction is received, the task script is obtained directly according to the task identifier carried in the task execution instruction.
Step S202, determining that the login task meets the set timing execution condition. The timed execution condition includes periodic execution of the task, with the task parameters being of known quantity or regularly varying. Since the login task needs to be executed at eight am every day and the account name and password required for login are fixed, i.e. the login task needs to be executed periodically and the task parameters are known, the login task satisfies the timing execution condition, and step S203 is executed.
Step S203, a timing script is acquired to trigger the periodic execution of the task script on the target page by using the timing script. The timing script includes program code for implementing the execution of the login task at eight am every day. The timing script is used to trigger the automatic execution of the task script at eight am every day. The business logic implemented by the task script comprises:
(1) Starting a browser and identifying an address bar of a first page of the browser;
(2) Inputting a page website in an address bar, and opening a login page;
(3) Identifying an account name input box and a password input box in the login page, filling a set account name in the account name input box by using an input method, and filling a set password in the password input box by using the input method;
(4) And identifying a login button in the login page, clicking the login button by using a click method, and completing the login task.
Example III
FIG. 3 is a schematic flow diagram of a script-based task processing method in accordance with yet another embodiment of the present invention. As shown in fig. 3, the script-based task processing method according to the embodiment of the present invention uses a job ticket creation task as a job task to be processed, and mainly includes the following steps:
step S301, acquiring a task script written for a job creation task of a job ticket. The task parameters that must be used by the job ticket creation task in this embodiment include the task number and the person identification of the job ticket to be created. Wherein the task number is related to the actual demand, is not a known quantity, and is irregularly circulated, thus requiring manual configuration before each execution of the task script. The frequency of creating the dispatch lists is related to the on-line period of the task, typically one month.
For the job creation task, the carded workflow is as follows, creating a tab page, jumping to a login page for creating the job creation task, inputting an account name and a password, clicking a login button, entering a task search page, inputting a task number, clicking a search button, entering a task configuration page, clicking a task name, clicking a task stage, clicking a creation button, entering a task creation page, selecting a creation type, inputting task description information, searching a personnel identifier, clicking a submit button, and completing the job creation task.
And writing a task script corresponding to the task creation task of the dispatch list based on puppeteer test frames by combining the workflow. puppeteer is a node. Js package, which is used to simulate the operation of the Chrome browser by calling Chrome DevTo ols to open an interface to communicate with the Chrome browser, and after the package is introduced, the program code can simulate the operation of the user on the page, such as jumping to the page address to be operated, and performing the operations of inputting, clicking and the like on the page.
In this embodiment, the task script includes program code for creating a tab page, jumping to a login page, program code for implementing a login function, program code for implementing a task search function, program code for implementing a task configuration function, and program code for implementing a task creation function. After the task script is written, the task script can be saved, and when a task execution instruction is received, the task script can be obtained directly according to a task identifier carried in the task execution instruction.
Step S302, determining that the job ticket creation task does not meet the timing execution condition. The timed execution condition includes periodic execution of the task, with the task parameters being of known quantity or regularly varying. Since the task parameter of the task number required for creating the dispatch list is not a known quantity and is irregular, it does not satisfy the timing execution condition, and step S303 is performed.
And step S303, executing a task script on the target page to complete the task of creating the job ticket. As can be seen from the workflow, the creation of the job ticket requires the operation of the login page, the task search page, the task configuration page, and the task creation page, so the target page in this embodiment includes the above-mentioned multiple pages. The business logic implemented by the task script comprises:
(1) Newly creating a tab page, and jumping to a login page for creating a dispatch list;
(2) Identifying an account name input box and a password input box in the login page, filling a set account name in the account name input box by using an input method, and filling a set password in the password input box by using the input method;
(3) Identifying a login button in a login page, clicking the login button by using a click method, and entering a task search page;
(4) Identifying a task search input box of a task search page, and inputting a set task number into the task search page by using an input method;
(5) Identifying a search button of a task search page, clicking the search button by using a click method, and entering a task configuration page;
(6) The task stage list of the task configuration page is identified, and a click method is used for selecting a corresponding task stage in the task stage list;
(7) Identifying a creation button of a task configuration page, clicking the creation button by using a click method, and entering the task creation page;
(8) Identifying a creation type drop-down box of the task creation page, and selecting a corresponding creation type from the creation type drop-down boxes by using a click method;
(9) Identifying a personnel query input box of the task creation page, and sequentially searching personnel identifiers of the job creation bill in the personnel query input box;
(10) And identifying a submit button of the task creation page, clicking the submit button by using a click method, and completing the task creation task of the job ticket.
It is understood that the business logic implemented by the task script in the third embodiment is merely an example, and in the business logic, steps (2) - (3) are used for implementing the login function, steps (4) - (5) are used for implementing the task search function, steps (6) - (7) are used for implementing the task configuration function, and steps (8) - (10) are used for implementing the task creation function. When in actual use, the business logic in the task script can be increased or decreased according to the workflow corresponding to the work task. For example, when only the search task is needed, the business logic includes steps (4) - (5).
In another embodiment, when creating the job ticket, the job creation may be directly performed without performing the job configuration, that is, after clicking the search button in step (5), the job creation page is directly skipped. The business logic implemented by the task script comprises steps (1) - (5) and steps (8) - (10), or comprises steps (1) - (5) and steps (9) - (10).
According to the script-based task processing method provided by the embodiment of the invention, through writing the task script based on puppeteer to process the task creation task of the job ticket, the office efficiency is improved, and the labor cost is reduced.
FIG. 4 is a schematic diagram of the main modules of a script-based task processing device in accordance with an embodiment of the present invention. As shown in fig. 4, the script-based task processing device 400 according to the embodiment of the present invention mainly includes:
The acquiring module 401 is configured to acquire a task script written for a task to be processed. For a work task to be processed, its workflow needs to be combed, and then a task script is written based on puppeteer test framework or selenium test tool. Wherein, the combing of the workflow is used for providing an integral logic framework for the writing of task scripts. The task script includes program code for identifying a target element of the target page and program code for simulating an operation indicated by the workflow at a location where the target element is identified.
When identifying the target element of the target page, the target element can be identified according to a preset element identification or style characteristic. For the mode of identifying the target element by using the element identifier, when programming the program code for realizing the target page, the unique element identifier is configured for the target element, and the target element and the corresponding element identifier are written into the configuration file. When the target element is identified, the corresponding target element can be determined by identifying the element identification of the target page and inquiring the configuration file according to the identified element identification.
In an embodiment, style characteristics may refer to CSS styles of page elements, including input box styles, button styles, list styles, and the like. For the manner of identifying the target element using the style characteristics, that is, whether the target element of the target page has the specified style characteristics, if the specified style characteristics are satisfied, the target element may be identified as the corresponding target element. For example, if a target element satisfies the input box style, it may be identified as an input box.
After the task script is written, the task script is saved, and when a work task is required to be executed, for example, a task execution instruction is received, the corresponding task script is obtained directly according to a task identifier carried in the task execution instruction.
And the execution module 402 is configured to determine that the task does not meet a set timing execution condition, execute the task script on the target page, and complete the task. The timed execution condition includes periodic execution of the task, with the task parameters being of known quantity or regularly varying. And judging whether the work task meets the timing execution conditions, and if the work task does not meet the timing execution conditions, executing a task script on the target page to complete the work task.
In addition, the script-based task processing device 400 of the embodiments of the present invention can further include a timing processing module, a presentation module, and a configuration module (not shown in FIG. 4). The timing processing module is used for determining that the work task meets the timing execution condition and acquiring a timing script so as to trigger the periodic execution of the task script on the target page by using the timing script.
And the display module is used for visually displaying the execution result generated by executing the task script. And the configuration module is used for configuring a unique element identifier for the target element and writing the target element and the corresponding element identifier into a configuration file.
From the above description, by acquiring the task script written for the work task, the target element of the target page can be identified when the task script is executed, so that operations such as clicking, inputting and the like are simulated, manual operations are not needed, labor cost is reduced, and office efficiency is improved.
FIG. 5 illustrates an exemplary system architecture 500 for a script-based task processing method or script-based task processing device to which embodiments of the present invention can be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 is used as a medium to provide communication links between the terminal devices 501, 502, 503 and the server 505. The network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 505 via the network 504 using the terminal devices 501, 502, 503 to receive or send messages or the like. The terminal devices 501, 502, 503 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 505 may be a server that provides various services, such as a background management server that processes task execution instructions transmitted by an administrator using the terminal devices 501, 502, 503. The background management server may acquire the task script, execute the task script, and feed back a processing result (for example, an execution result) to the terminal device.
It should be noted that, the script-based task processing method provided by the embodiment of the present application is generally executed by the server 505, and accordingly, the script-based task processing device is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
According to an embodiment of the invention, the invention further provides an electronic device and a computer readable medium.
The electronic device comprises one or more processors and a storage device, wherein the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the task processing method based on the script.
The computer readable medium of the present invention has stored thereon a computer program which, when executed by a processor, implements a script-based task processing method of the embodiments of the present invention.
Referring now to FIG. 6, there is illustrated a schematic diagram of a computer system 600 suitable for use in implementing an electronic device of an embodiment of the present invention. The electronic device shown in fig. 6 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments of the invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Connected to the I/O interface 605 are an input section 606 including a keyboard, a mouse, and the like, an output section 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like, a storage section 608 including a hard disk, and the like, and a communication section 609 including a network interface card such as a LAN card, a modem, and the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
In particular, the processes described above in the main step diagrams may be implemented as computer software programs according to the disclosed embodiments of the invention. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the main step diagrams. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the present invention are performed when the computer program is executed by the central processing unit (CP U) 601.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, which may be described as, for example, a processor comprising an acquisition module and an execution module. The names of these modules do not in any way limit the module itself, and the acquisition module may also be described as a "module that acquires task scripts written for a task to be processed", for example.
As a further aspect, the invention also provides a computer readable medium which may be comprised in the device described in the above embodiments or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to include obtaining a task script written for a task to be processed, wherein the task script is used for identifying a target element of a target page, simulating an operation indicated by a workflow for implementing the task at a position where the target element is identified, and determining that the task does not satisfy a set timing execution condition, executing the task script on the target page, and completing the task.
According to the technical scheme provided by the embodiment of the invention, the task script written for the work task is obtained, so that the target element of the target page can be identified when the task script is executed, and then operations such as clicking, inputting and the like are simulated, manual operations are not needed, the labor cost is reduced, and the office efficiency is improved.
The product can execute the method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be found in the methods provided in the embodiments of the present invention.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.