Browser operation simulation method, device, readable storage medium and terminal device

Through the preset browser operation script library, the problem of inefficiency of repetitive operation and errors in browser operations is solved, and efficient automated operation simulation is achieved.

CN109783755BActive Publication Date: 2024-11-19SHENZHEN LANYUE INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201811567063.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-12-20
Publication Date
2024-11-19
Estimated Expiration
2038-12-20

AI Technical Summary

Technical Problem

In browser operations, repetitive operations are inefficient and prone to operational errors.

Method used

Receive user simulation instructions through the preset browser operation script library, find and execute corresponding browser operation scripts, read and execute each operation entry in turn, and call the browser operation control to perform simulation operations according to the operation information.

Benefits of technology

It realizes automatic execution of repetitive browser operations, significantly improving operational efficiency and avoiding operational errors caused by user negligence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109783755B_ABST
    Figure CN109783755B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of computer technology, and in particular, relates to a browser operation simulation method, device, computer-readable storage medium and terminal device. The method receives a browser operation simulation instruction issued by a user, wherein the browser operation simulation instruction includes an operation script identifier; searches for a browser operation script corresponding to the operation script identifier in a preset browser operation script library; reads each browser operation item from the browser operation script in sequence, wherein each browser operation item corresponds to a browser operation action, and each browser operation item includes a browser operation control and operation information; executes each browser operation item in the browser operation script in sequence to realize the simulation of the browser operation process, wherein, during the execution process of each browser operation item, the browser operation control is called to perform the browser operation simulation according to the operation information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and in particular relates to a browser operation simulation method, device, computer-readable storage medium and terminal equipment. Background Art

[0002] In people's daily work and life, there are often some scenarios where repetitive operations on the browser are required. For example, when verifying the function of a web page, users are required to continuously click buttons, enter information in text boxes, etc. Such repetitive operations often consume a lot of users' time and energy, are extremely inefficient, and are prone to operational errors due to user negligence. Summary of the invention

[0003] In view of this, the embodiments of the present invention provide a browser operation simulation method, apparatus, computer-readable storage medium and terminal device to solve the problem of low operating efficiency and easy occurrence of operating errors when performing repetitive operations on the browser.

[0004] A first aspect of an embodiment of the present invention provides a browser operation simulation method, which may include:

[0005] Receiving a browser operation simulation instruction sent by a user, wherein the browser operation simulation instruction includes an operation script identifier;

[0006] Searching for a browser operation script corresponding to the operation script identifier in a preset browser operation script library;

[0007] Reading each browser operation entry from the browser operation script in sequence, wherein each browser operation entry corresponds to a browser operation action, and each browser operation entry includes a browser operation control and operation information;

[0008] The browser operation items in the browser operation script are executed in sequence to realize the simulation of the browser operation process, wherein, during the execution process of each browser operation item, the browser operation control is called to perform the browser operation simulation according to the operation information.

[0009] A second aspect of an embodiment of the present invention provides a browser operation simulation device, which may include:

[0010] An operation simulation instruction receiving module, used for receiving a browser operation simulation instruction issued by a user, wherein the browser operation simulation instruction includes an operation script identifier;

[0011] An operation script search module, used to search a preset browser operation script library for a browser operation script corresponding to the operation script identifier;

[0012] An operation item reading module, used to read each browser operation item from the browser operation script in sequence, wherein each browser operation item corresponds to a browser operation action, and each browser operation item includes a browser operation control and operation information;

[0013] The operation item execution module is used to execute each browser operation item in the browser operation script in sequence to realize the simulation of the browser operation process, wherein, during the execution process of each browser operation item, the browser operation control is called to perform the browser operation simulation according to the operation information.

[0014] A third aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the following steps are implemented:

[0015] Receiving a browser operation simulation instruction sent by a user, wherein the browser operation simulation instruction includes an operation script identifier;

[0016] Searching for a browser operation script corresponding to the operation script identifier in a preset browser operation script library;

[0017] Reading each browser operation entry from the browser operation script in sequence, wherein each browser operation entry corresponds to a browser operation action, and each browser operation entry includes a browser operation control and operation information;

[0018] The browser operation items in the browser operation script are executed in sequence to realize the simulation of the browser operation process, wherein, during the execution process of each browser operation item, the browser operation control is called to perform the browser operation simulation according to the operation information.

[0019] A fourth aspect of an embodiment of the present invention provides a terminal device, including a memory, a processor, and a computer-readable instruction stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer-readable instruction:

[0020] Receiving a browser operation simulation instruction sent by a user, wherein the browser operation simulation instruction includes an operation script identifier;

[0021] Searching for a browser operation script corresponding to the operation script identifier in a preset browser operation script library;

[0022] Reading each browser operation entry from the browser operation script in sequence, wherein each browser operation entry corresponds to a browser operation action, and each browser operation entry includes a browser operation control and operation information;

[0023] The browser operation items in the browser operation script are executed in sequence to realize the simulation of the browser operation process, wherein, during the execution process of each browser operation item, the browser operation control is called to perform the browser operation simulation according to the operation information.

[0024] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: the embodiments of the present invention pre-set a browser operation script library, and after receiving the browser operation simulation instruction issued by the user, the corresponding browser operation script can be automatically searched in the browser operation script library, and each browser operation item is read from the browser operation script in sequence, and each browser operation item in the browser operation script is executed in sequence. Since each browser operation item corresponds to a browser operation action, each browser operation item includes a browser operation control and operation information. During the execution of each browser operation item, the browser operation control is called to perform browser operation simulation according to the operation information, thereby realizing the simulation of a complete browser operation process. Through the embodiments of the present invention, repetitive operations on the browser can be automatically executed according to the user's instructions, which greatly improves the operation efficiency and effectively avoids the operation errors that may be caused by the user's negligence. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0026] Figure 1 A schematic flow chart of the generation process of the browser operation script;

[0027] Figure 2 A schematic flow chart for determining an element object and an operation path corresponding to the target operation control in a browser;

[0028] Figure 3 A flowchart of an embodiment of a browser operation simulation method in an embodiment of the present invention;

[0029] Figure 4 A structural diagram of an embodiment of a browser operation simulation device in an embodiment of the present invention;

[0030] Figure 5 The present invention is a schematic block diagram of a terminal device in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] In this embodiment, the operation flow of the browser can be disassembled into multiple single browser operation actions in advance, and the execution logic can be encapsulated in each browser operation control and presented to the user in a graphical manner. The user does not need to write a complex script, but can complete the script writing work of a complete browser operation flow through simple control selection and a small amount of operation information configuration, and execute the browser operation script to realize the simulation of the browser operation process.

[0033] like Figure 1 As shown, the generation process of the browser operation script may include:

[0034] Step S101: receiving a browser operation script writing instruction issued by a user, and displaying each browser operation control in a preset browser operation control library to the user.

[0035] In this embodiment, an application program for users to write browser operation scripts is provided, and users can write browser operation scripts on a terminal device on which the application program is installed.

[0036] When it is necessary to write a browser operation script, the user can send a browser operation script writing instruction to the terminal device through a specified human-machine interaction interface (HMI). After receiving the instruction, the terminal device displays various browser operation controls in a preset browser operation control library to the user for selection.

[0037] Among them, each browser operation control corresponds to a browser operation action. The control encapsulates the internal programming logic and only provides a small number of parameters for users to configure the operation information, presenting the operation to the user in a simple and intuitive way.

[0038] The browser operation controls in the browser operation control library include but are not limited to browser open controls, text input controls, mouse click controls, mouse double-click controls, dialog box close controls, window close controls, enter controls, mouse hover controls, drop-down box selection controls, element drag controls, attachment upload controls, web page verification code recognition controls, etc.

[0039] Among them, the browser open control is used to simulate the operation of the user opening the browser, the text input control is used to simulate the operation of the user entering text in the text box, the mouse click control is used to simulate the operation of the user clicking the mouse, the mouse double-click control is used to simulate the operation of the user double-clicking the mouse, the dialog box close control is used to simulate the operation of the user closing the pop-up dialog box, the window close control is used to simulate the operation of the user closing the window, the enter control is used to simulate the operation of the user hitting the enter key, the mouse hover control is used to simulate the operation of the user hovering the mouse over a certain interface element, the drop-down box selection control is used to simulate the operation of the user selecting the drop-down box, the element drag control is used to simulate the operation of the user dragging the element, the attachment upload control is used to simulate the operation of the user uploading the attachment, and the web page verification code recognition control is used to simulate the operation of the user recognizing the web page verification code.

[0040] Step S102: receiving a browser operation control selection instruction sent by a user.

[0041] The browser operation control selection instruction includes a control identifier.

[0042] The user can select from various browser operation controls displayed on the terminal device through the human-computer interaction interface, and send a browser operation control selection instruction carrying a control identifier to the terminal device.

[0043] Step S103: Select a target operation control corresponding to the control identifier in the browser operation control library, and obtain operation information corresponding to the target operation control.

[0044] After receiving the browser operation control selection instruction sent by the user, the terminal device can extract the control identifier therein, select the operation control corresponding to the control identifier in the browser operation control library, that is, the target operation control, and obtain the operation information corresponding to the target operation control.

[0045] In the process of acquiring the operation information corresponding to the target operation control, the terminal device first monitors whether a browser element selection instruction issued by the user by clicking a corresponding button on the human-computer interaction interface is received. If a browser element selection instruction issued by the user is received, the terminal device performs the following steps: Figure 2 The process shown determines the element object and the operation path corresponding to the target operation control in the browser:

[0046] Step S1031: monitor the mouse pointer movement event, and when the mouse pointer movement is detected, obtain the window handle of the current active window pointed to by the mouse pointer.

[0047] In this embodiment, the mouse pointer movement event can be monitored by adding an Onmousemove function to the desktop. When the mouse pointer moves, the Onmousemove function is triggered, and the window handle of the current active window pointed to by the mouse pointer is obtained through the WindowFromPoint function.

[0048] Among them, Onmousemove and WindowFromPoint are system functions in Hyper Text Mark-up Language (HTML). The Onmousemove function will be triggered when the mouse pointer moves, and the function of the WindowFromPoint function is to obtain the handle of the window containing the specified point.

[0049] Step S1032: Determine whether the current active window is a browser window according to the window handle.

[0050] The terminal device extracts the class name (ClassName) from the window handle, and if the class name is not Internet Explorer_Server, determines that the current active window is not a browser window; if the class name is Internet Explorer_Server, determines that the current active window is a browser window.

[0051] Step S1033: If the current active window is a browser window, then the element object pointed to by the mouse pointer is obtained.

[0052] When the current active window is a browser window, the terminal device sends a WM_HTML_GETOBJECT message to the current active window, calls the COM interface, and successfully returns the browser document object, which is the browser tab currently viewed. The ElementFromPoint interface is called on the object to obtain the element in the tab pointed to by the current mouse pointer, and obtain the element object in the document object. The ElementFromPoint interface can obtain the rectangular position, length, width and other properties of the element object. Based on these properties, an element rectangular frame can be drawn on the screen to indicate the element object pointed to by the current mouse pointer.

[0053] Step S1034: traverse the parent objects of the element object in order, and construct an operation path of the element object according to the parent objects of the element object.

[0054] After obtaining the element object, the parent object of the element object can be further obtained, and the parent object is used as the base element, and then the parent object of the base element is obtained. In this way, the parent objects of each level of the element object are traversed in sequence until the parent object is empty, and the element structure tree is obtained. The parent objects of each level are connected with " / " to obtain the operation path (XPath) of the element object. The example is as follows:

[0055] "html / body[1] / div[@id='wrapper'] / div[@id='head'] / div[1] / div[1] / div[1] /

[0056] form[@id='form'and@name='f'] / span[1] / input[@id='kw'and@name='wd']"

[0057] The innermost element of the operation path is the input element, that is, the element object pointed by the mouse. Get its parent object span, get span's parent object form, and so on until the top-level element object html. Each tag is distinguished by ID and Name. When both are empty, it is distinguished by the order of appearance of sibling nodes.

[0058] Finally, determine whether the current element is an IFrame. IFrame is an HTML inline frame element that is used to represent a nested browsing context, effectively embedding another HTML page into the current page. If the current element is an IFrame, it means that the final element object has not been obtained, and only the document object containing the final element object has been obtained. The element object is converted into a document object, and then the operations of steps S1033 and S1034 are repeated until the final element object is obtained. An example of an operation path containing an IFrame is as follows, where the document object of the IFrame and the parent document object are separated by a semicolon:

[0059] "html / body[1] / div[1] / iframe[@id="frame1'];html / body[1] / div[@id="wrapper'] / div[@id="head'] / div[1] / div[1] / div[1] / form[@id="form'and@name="f'] / span[1] / input[@id="kw'and@name="wd']"

[0060] In passing Figure 2After the process shown determines the element object and operation path corresponding to the target operation control in the browser, the user's operation content on the element object can be further obtained, and the element object, operation path and operation content can be added to the operation information corresponding to the target operation control.

[0061] The operation content of the user on the element object corresponds to the current operation control, that is, the operation content is generally different for different operation controls. Taking the text input control as an example, the specific operation content is to input the text issued by the user into the element object.

[0062] Step S104: construct the target operation control and the operation information into a browser operation item.

[0063] Each browser operation entry corresponds to a browser operation action, and each browser operation entry includes a browser operation control and operation information.

[0064] Step S105: receiving a browser operation script generation instruction issued by the user, and generating a browser operation script for each browser operation item according to the sequence of construction.

[0065] After completing the construction of each browser operation item, the user can send a browser operation script generation instruction to the terminal device through the human-computer interaction interface. After receiving the instruction, the terminal device can generate a browser operation script as shown in the following table for each browser operation item in the order of construction:

[0066] Browser Action Items Browser operation controls Operational Information Operation Item 1 Operation Controls XX Operation Information XX Operation Item 2 Operation Controls XX Operation Information XX Operation Item 3 Operation Controls XX Operation Information XX …… …… ……

[0067] After the browser operation script is generated, the terminal device can add it into the browser operation script library in the form of a script file so that subsequent users can call it.

[0068] The above is only a generation process of a browser operation script. In actual application, corresponding browser operation scripts can be generated for multiple different browser operation processes according to the above process and added to the browser operation script library to meet the needs of users in different scenarios.

[0069] like Figure 3 As shown, after the browser operation script library is constructed, the simulation process of the browser operation can be performed through the following steps in the embodiment of the present invention:

[0070] Step S301: receiving a browser operation simulation instruction sent by a user.

[0071] The browser operation simulation instruction includes an operation script identifier. When the user needs to execute a predetermined browser operation process, the browser operation simulation instruction can be sent to the terminal device through the human-computer interaction interface. Since the browser operation script library contains a large number of browser operation scripts, in order to facilitate distinction, in this embodiment, each browser operation script is uniquely identified by an operation script identifier, and each browser operation script corresponds to a unique operation script identifier, which is carried in the browser operation simulation instruction sent by the user.

[0072] Step S302: Search the browser operation script library for a browser operation script corresponding to the operation script identifier.

[0073] After receiving the browser operation simulation instruction sent by the user, the terminal device can extract the operation script identifier from the instruction, and then search the browser operation script corresponding to the operation script identifier in the browser operation script library.

[0074] Step S303: read each browser operation item from the browser operation script in sequence.

[0075] Step S304: execute each browser operation item in the browser operation script in sequence to simulate the browser operation process.

[0076] Wherein, during the execution process of each browser operation item, the browser operation control is called to perform browser operation simulation according to the operation information.

[0077] First, the terminal device searches for the target element object corresponding to the browser operation control in the browser window step by step according to the operation path in the operation information. Specifically, the terminal device first determines whether there is an IFrame object in the operation path (determined by the separator semicolon), obtains the top-level operation path (the part before the first semicolon), and then splits the top-level operation path with " / " to obtain an element structure tree list, gradually finds the last element object, determines whether it has reached the bottom layer, and if not, takes the operation path of the next layer, and repeats the above process until the target element object to be operated (i.e., the element object in the operation information) is found.

[0078] Take the following operation path as an example:

[0079] "html / body[1] / div[1] / iframe[@id="frame1'];html / body[1] / div[@id="wrapper'] / div[@id="head'] / div[1] / div[1] / div[1] / form[@id="form'and@name="f'] / span[1] / input[@id="kw'and@name="wd']"

[0080] First, split with ";" to get the top-level operation path "html / body[1] / div[1] / iframe[@id='frame1']", gradually find the last element object "[@id='frame1']", and determine whether it has reached the bottom layer. If not, take the next layer's operation path "html / body[1] / div[@id='wrapper'] / div[@id='head'] / div[1] / div[1] / div[1] / form[@id='form'and@name='f'] / span[1] / input[@id='kw'and@name='wd']".

[0081] The final element object "input[@id='kw'and@name='wd']" is gradually found, which is the target element object to be finally operated.

[0082] After the target element object to be finally operated is found, the browser operation control can be called to operate the target element object according to the operation content in the operation information.

[0083] In summary, the embodiment of the present invention pre-sets a browser operation script library. After receiving the browser operation simulation instruction issued by the user, the corresponding browser operation script can be automatically searched in the browser operation script library, and each browser operation item is read from the browser operation script in sequence, and each browser operation item in the browser operation script is executed in sequence. Since each browser operation item corresponds to a browser operation action, each browser operation item includes a browser operation control and operation information. During the execution of each browser operation item, the browser operation control is called to perform browser operation simulation according to the operation information, thereby realizing the simulation of a complete browser operation process. Through the embodiment of the present invention, repetitive operations on the browser can be automatically executed according to the user's instructions, which greatly improves the operation efficiency and effectively avoids the operation errors that may be caused by the user's negligence.

[0084] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0085] Corresponding to the browser operation simulation method described in the above embodiment, Figure 4 A structural diagram of an embodiment of a browser operation simulation device provided by an embodiment of the present invention is shown.

[0086] In this embodiment, a browser operation simulation device may include:

[0087] The operation simulation instruction receiving module 401 is used to receive the browser operation simulation instruction sent by the user, wherein the browser operation simulation instruction includes an operation script identifier;

[0088] An operation script search module 402 is used to search a preset browser operation script library for a browser operation script corresponding to the operation script identifier;

[0089] An operation item reading module 403 is used to sequentially read various browser operation items from the browser operation script, wherein each browser operation item corresponds to a browser operation action, and each browser operation item includes a browser operation control and operation information;

[0090] The operation entry execution module 404 is used to execute each browser operation entry in the browser operation script in sequence to realize the simulation of the browser operation process, wherein, during the execution process of each browser operation entry, the browser operation control is called to perform the browser operation simulation according to the operation information.

[0091] Furthermore, the browser operation simulation device may also include:

[0092] The operation control display module is used to receive the browser operation script writing instruction issued by the user and display each browser operation control in the preset browser operation control library to the user;

[0093] A control selection instruction receiving module, used for receiving a browser operation control selection instruction issued by a user, wherein the browser operation control selection instruction includes a control identifier;

[0094] A target operation control selection module, used for selecting a target operation control corresponding to the control identifier in the browser operation control library;

[0095] An operation information acquisition module, used to acquire operation information corresponding to the target operation control;

[0096] An operation entry construction module, used to construct the target operation control and the operation information into a browser operation entry;

[0097] The operation script generation module is used to receive the browser operation script generation instruction issued by the user, generate the browser operation script for each browser operation item according to the constructed sequence, and add the generated browser operation script into the browser operation script library.

[0098] Furthermore, the operation information acquisition module may include:

[0099] An element object determination unit, configured to receive a browser element selection instruction issued by a user, and determine an element object and an operation path corresponding to the target operation control in the browser;

[0100] The operation content acquisition unit is used to acquire the user's operation content on the element object, and add the element object, the operation path and the operation content to the operation information corresponding to the target operation control.

[0101] Furthermore, the element object determining unit may include:

[0102] The window handle acquisition subunit is used to monitor the mouse pointer movement event. When the mouse pointer is detected to have moved, the window handle of the currently active window pointed to by the mouse pointer is acquired.

[0103] A browser window determination subunit, used for determining whether the current active window is a browser window according to the window handle;

[0104] An element object acquisition subunit, used for acquiring the element object pointed to by the mouse pointer if the current active window is a browser window;

[0105] The operation path construction subunit is used to traverse the parent objects of the element object in sequence and construct the operation path of the element object according to the parent objects of the element object.

[0106] Furthermore, the operation item execution module may include:

[0107] A target element object searching unit, configured to search the target element object corresponding to the browser operation control in the browser window step by step according to the operation path in the operation information;

[0108] The operation execution unit is used to call the browser operation control to operate the target element object according to the operation content in the operation information.

[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0110] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0111] Figure 5 A schematic block diagram of a terminal device provided by an embodiment of the present invention is shown. For ease of explanation, only the parts related to the embodiment of the present invention are shown.

[0112] In this embodiment, the terminal device 5 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device 5 may include: a processor 50, a memory 51, and a computer-readable instruction 52 stored in the memory 51 and executable on the processor 50, such as a computer-readable instruction for executing the above-mentioned browser operation simulation method. When the processor 50 executes the computer-readable instruction 52, the steps in the above-mentioned browser operation simulation method embodiments are implemented, such as Figure 3 Alternatively, when the processor 50 executes the computer-readable instructions 52, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 4 Functions of modules 401 to 404 are shown.

[0113] Exemplarily, the computer-readable instructions 52 may be divided into one or more modules / units, which are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer-readable instructions 52 in the terminal device 5.

[0114] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0115] The memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 5. Further, the memory 51 may also include both an internal storage unit of the terminal device 5 and an external storage device. The memory 51 is used to store the computer-readable instructions and other instructions and data required by the terminal device 5. The memory 51 may also be used to temporarily store data that has been output or is to be output.

[0116] Each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0117] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of computer-readable instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store computer-readable instructions.

[0118] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A browser operation simulation method, characterized in that: include: Receive the browser operation script writing instruction issued by the user, and display each browser operation control in the preset browser operation control library to the user; Receive a browser operation control selection instruction issued by a user, wherein the browser operation control selection instruction includes a control identifier; select a target operation control corresponding to the control identifier in the browser operation control library; receive a browser element selection instruction issued by a user, determine an element object and an operation path corresponding to the target operation control in the browser; obtain the user's operation content on the element object, and add the element object, the operation path and the operation content to the operation information corresponding to the target operation control; Constructing the target operation control and the operation information into a browser operation entry; Receive a browser operation script generation instruction issued by a user, generate a browser operation script for each browser operation item according to the sequence of construction, and add the generated browser operation script to a browser operation script library; Receiving a browser operation simulation instruction sent by a user, wherein the browser operation simulation instruction includes an operation script identifier; Searching the browser operation script library for a browser operation script corresponding to the operation script identifier; Reading each browser operation entry from the browser operation script in sequence, wherein each browser operation entry corresponds to a browser operation action, and each browser operation entry includes a browser operation control and operation information; The browser operation items in the browser operation script are executed in sequence to realize the simulation of the browser operation process, wherein, during the execution process of each browser operation item, the browser operation control is called to perform the browser operation simulation according to the operation information.

2. The browser operation simulation method according to claim 1, characterized in that: The step of determining the element object and the operation path corresponding to the target operation control in the browser includes: Monitor mouse pointer movement events. When the mouse pointer is detected to have moved, obtain the window handle of the currently active window pointed to by the mouse pointer. Determining whether the current active window is a browser window according to the window handle; If the current active window is a browser window, then obtaining the element object pointed to by the mouse pointer; The parent objects of the element object are traversed in sequence, and the operation path of the element object is constructed according to the parent objects of the element object.

3. The browser operation simulation method according to any one of claims 1 to 2, characterized in that: The calling of the browser operation control to perform browser operation simulation according to the operation information comprises: Searching for a target element object corresponding to the browser operation control in the browser window step by step according to the operation path in the operation information; The browser operation control is called to operate the target element object according to the operation content in the operation information.

4. A browser operation simulation device, characterized in that: include: The operation control display module is used to receive the browser operation script writing instruction issued by the user and display each browser operation control in the preset browser operation control library to the user; A control selection instruction receiving module, used for receiving a browser operation control selection instruction issued by a user, wherein the browser operation control selection instruction includes a control identifier; A target operation control selection module, used for selecting a target operation control corresponding to the control identifier in the browser operation control library; The operation information acquisition module is used to receive the browser element selection instruction issued by the user, determine the element object and the operation path corresponding to the target operation control in the browser; obtain the user's operation content on the element object, and add the element object, operation path and the operation content to the operation information corresponding to the target operation control; An operation entry construction module, used to construct the target operation control and the operation information into a browser operation entry; An operation script generation module is used to receive a browser operation script generation instruction issued by a user, generate a browser operation script for each browser operation item according to the sequence of construction, and add the generated browser operation script to a browser operation script library; An operation simulation instruction receiving module, used for receiving a browser operation simulation instruction issued by a user, wherein the browser operation simulation instruction includes an operation script identifier; An operation script search module, used to search the browser operation script library for the browser operation script corresponding to the operation script identifier; An operation item reading module, used to read each browser operation item from the browser operation script in sequence, wherein each browser operation item corresponds to a browser operation action, and each browser operation item includes a browser operation control and operation information; The operation item execution module is used to execute each browser operation item in the browser operation script in sequence to realize the simulation of the browser operation process, wherein, during the execution process of each browser operation item, the browser operation control is called to perform the browser operation simulation according to the operation information.

5. A computer-readable storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the steps of the browser operation simulation method according to any one of claims 1 to 3 are implemented.

6. A terminal device, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer-readable instructions, the steps of the browser operation simulation method according to any one of claims 1 to 3 are implemented.