CN113221042A - Webpage operation process recording method and device, electronic equipment and computer readable medium - Google Patents

Webpage operation process recording method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN113221042A
CN113221042A CN202110599838.7A CN202110599838A CN113221042A CN 113221042 A CN113221042 A CN 113221042A CN 202110599838 A CN202110599838 A CN 202110599838A CN 113221042 A CN113221042 A CN 113221042A
Authority
CN
China
Prior art keywords
object model
document object
model information
browser
associated document
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.)
Granted
Application number
CN202110599838.7A
Other languages
Chinese (zh)
Other versions
CN113221042B (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.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding Co 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 Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202110599838.7A priority Critical patent/CN113221042B/en
Publication of CN113221042A publication Critical patent/CN113221042A/en
Application granted granted Critical
Publication of CN113221042B publication Critical patent/CN113221042B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06MCOUNTING MECHANISMS; COUNTING OF OBJECTS NOT OTHERWISE PROVIDED FOR
    • G06M1/00Design features of general application
    • G06M1/27Design features of general application for representing the result of count in the form of electric signals, e.g. by sensing markings on the counter drum
    • G06M1/272Design features of general application for representing the result of count in the form of electric signals, e.g. by sensing markings on the counter drum using photoelectric means

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of software engineering, in particular to a method and a device for recording a webpage operation process, electronic equipment and a computer readable medium. The method comprises the following steps: quiesce launching a secondary browser in response to a user operation event on a primary browser; selecting associated document object model information based on the occurrence position of the user operation event on the main browser; sending the associated document object model information to the auxiliary browser; acquiring positioning characteristics based on the associated document object model information; and sending the positioning feature back to the main browser as a recording script of the user operation event. The method in the embodiment of the invention can greatly reduce the unnecessary repeated recording of the recording script, thereby reducing the processing pressure of a processor, improving the accuracy of the recording script and avoiding the consumption of storage space and processing capacity caused by inaccurate recording of the positioning characteristics.

Description

Webpage operation process recording method and device, electronic equipment and computer readable medium
Technical Field
The invention relates to the technical field of software engineering, in particular to a method and a device for recording a webpage operation process, electronic equipment and a computer readable medium.
Background
In the existing UI automatic recording technology, a user operation event is monitored by injecting JavaScript, and then event information is recorded and converted into corresponding playback grammar. As an operation element, successively trying to acquire the positioning identifier of the document object model according to the sequence of id, name and class.
In the process of implementing the invention, the inventor finds that: the complexity of a browser page is extremely high, dynamically loaded document object models often appear, the document object models are difficult to locate, and id of the document object models is often dynamically generated, so that recorded document object model features cannot be directly used in secondary execution such as playback, the access difficulty of testers is too high, the unavailable use of the document object model features can cause the testers to manually mark the document object models, the time is long, and the technical requirement is high.
In view of the above problems, no effective solution is proposed, and a new method for recording a webpage operation process is urgently needed to solve the above problems.
Disclosure of Invention
In view of the above, to solve the technical problem or at least partially solve the technical problem, embodiments of the present invention provide a method, an apparatus, an electronic device, and a computer-readable medium for recording a web page operation process.
In a first aspect, an embodiment of the present invention provides a method for recording a web page operation process, including: quiesce launching a secondary browser in response to a user operation event on a primary browser; selecting associated document object model information based on the occurrence position of the user operation event on the main browser; sending the associated document object model information to the auxiliary browser; acquiring positioning characteristics based on the associated document object model information; and sending the positioning feature back to the main browser as a recording script of the user operation event.
Optionally, in the method for recording a web page operation process according to the embodiment of the present invention, the sending the associated document object model information to the auxiliary browser includes: sending a request for associated document object model information to the main browser; and receiving the associated document object model information returned from the main browser.
Optionally, in the method for recording a web page operation process according to the embodiment of the present invention, the associated document object model information further includes a key document object model information determination condition, and selecting the associated document object model information based on an occurrence position of the user operation event on the main browser includes: judging whether the associated document object model information meets the judgment condition of the key document object model information, and selecting the associated document object model information meeting the judgment condition of the key document object model information as the key document object model information.
Optionally, in the method for recording a web page operation process according to the embodiment of the present invention, the condition for determining the key document object model information is: and the ID information in the associated document object model information received by the auxiliary browser is consistent with the ID information of the main browser at the current moment.
Optionally, in the method for recording a web page operation process according to the embodiment of the present invention, the determining whether the associated document object model information meets the determination condition of the key document object model information, and selecting the associated document object model information meeting the determination condition of the key document object model information as the key document object model information includes:
and if the number of the associated document object model information meeting the judgment condition of the key document object model information is more than 1, selecting the associated document object model information closest to the occurrence coordinate of the user operation event from the associated document object model information meeting the judgment condition of the key document object model information, and sending the associated document object model information to the auxiliary browser.
Optionally, in the method for recording a web page operation process according to the embodiment of the present invention, an initial value of a counter is set to be equal to the number of associated document object model information related to the user operation event; and if the associated document object model information does not meet the judgment condition of the key document object model information, subtracting 1 from the value of the counter, and sending next associated document object model information next to the associated document object model information to the auxiliary browser.
Optionally, in the method for recording a webpage operation process according to the embodiment of the present invention, the auxiliary browser includes n virtual browsers respectively controlled by the main browser, where n is a positive integer greater than or equal to 2.
Optionally, in the method for recording a web page operation process according to the embodiment of the present invention, the starting of the auxiliary browser in a silent manner in response to the user operation event on the main browser includes: synchronously and silently starting n virtual browsers in response to a user operation event on the main browser; the sending the positioning feature back to the main browser as a recording script of the user operation event includes: and when judging that all the associated document object model information received from the n virtual browsers has the same ID information as the ID information of the main browser at the current moment, recording the positioning feature as a recording script of the user operation event.
Optionally, in the method for recording a web page operation process according to the embodiment of the present invention, when one piece of associated document object model information of each piece of associated document object model information received from the n virtual browsers in synchronization has ID information different from ID information of the main browser at the current time, next associated document object model information of the main browser immediately after the current time is sent to the n virtual browsers in synchronization.
In a second aspect, an embodiment of the present invention provides a web page operation process recording apparatus, including: the auxiliary browser starting unit responds to a user operation event on the main browser and starts the auxiliary browser in a silent mode; a related document object model information selecting unit that selects related document object model information based on an occurrence position of the user operation event on the main browser; a related document object model information sending unit that sends the related document object model information to the auxiliary browser; a positioning feature obtaining unit that obtains a positioning feature based on the associated document object model information; and the recording script recording unit is used for sending the positioning features back to the main browser to be recorded into a recording document as the recording script of the user operation event.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, a communication interface, and a communication bus, where the memory stores a computer program that is executable on the processor, and the memory and the processor communicate with the communication interface through the communication bus, where the processor implements the steps of the method according to the embodiment of the present invention when executing the computer program.
In a fourth aspect, the present invention provides a computer-readable medium storing non-volatile program code executable by a processor, where the program code causes the processor to execute the method according to the embodiment of the present invention.
In the scheme of the embodiment of the invention, one or more auxiliary browsers are started simultaneously during recording, the auxiliary browsers are controlled by the main browser, and the commands of the main browser are responded in real time synchronously, so that the method has the following beneficial effects: the usability of the recording script is enhanced, and the positioning element code script does not need to be modified after the user records.
In addition, in element positioning in conventional recording, because the page complexity is high, the positioning reliability is low, and a user often needs to manually adjust the element positioning feature identifier, because the browser cannot determine whether the content acquired by the browser is dynamically variable during recording.
In contrast, the technical scheme of the embodiment of the invention ensures that the pages of the main browser and the auxiliary browser are synchronous, when a user sends a recording operation in the main browser, the associated document object model is sent to the auxiliary browser for verification, and the document object model characteristic is recorded only when the document object model identifies that several browsers exist simultaneously. This allows accurate positioning of the document object model element even if it is run again.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the related art, the drawings used in the description of the embodiments or the related art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a schematic diagram of a hardware environment of an alternative method for recording a web page operation process according to an embodiment of the present invention;
fig. 2 is a flowchart of an alternative method for recording a web page operation process according to an embodiment of the present invention;
FIG. 3 is a block diagram of an alternative web page operation process recording system according to an embodiment of the present invention;
fig. 4 is a block diagram of an alternative web page operation process recording device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an alternative electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
For the understanding of the embodiments of the present invention, the system architecture related to the embodiments of the present invention will be described first with reference to the accompanying drawings.
Referring to fig. 1, a schematic diagram of a hardware environment of an optional method for recording a web page operation process according to an embodiment of the present invention is shown.
The method for recording the webpage operation process can be applied to a hardware environment formed by a terminal 101 and a server 103 as shown in fig. 1, and the webpage operation process recording system can be mounted on the terminal or the server. As shown in fig. 1, a server 103 is connected to a terminal 101 through a network, which may be used to provide services for the terminal or a client installed on the terminal, and a database 105 may be provided on the server or separately from the server, and is used to provide data storage services for the server 103, and the network includes but is not limited to: wide area network, metropolitan area network, or local area network, and the terminal 101 includes but is not limited to a PC, a cell phone, a tablet computer, and the like.
The web page operation process recording method in the embodiment of the present invention may be executed by the server 103, or may be executed by both the server 103 and the terminal 101.
As shown in fig. 2, in order to enhance the usability of the recorded script, the method for recording a webpage operation process according to the embodiment of the present invention can execute operations such as playback and use without modifying the positioning element code script after the user records the script, and includes the following steps:
step S202, responding to a user operation event on a main browser and starting an auxiliary browser in a silent mode;
step S204, selecting associated document object model information based on the occurrence position of the user operation event on the main browser;
step S206, sending the associated document object model information to the auxiliary browser;
step S208, acquiring positioning characteristics based on the associated document object model information;
step S210, sending the positioning feature back to the main browser as a recording script of the user operation event.
The details of the above steps are described in detail below.
In step S202, the secondary browser is launched silently in response to a user operation event on the primary browser. The silent start may be performed in the background, and may be invisible and imperceptible to the operating user.
When a user starts recording, a main browser window is started, and an auxiliary browser is started in a background in a silent mode through instructions of the main browser to assist in document object model verification, and the user can also modify the number of the auxiliary browsers in a parameter transmission mode (theoretically, the larger the number is, the more accurate the number is).
In step S204, the associated document object model information is selected based on the occurrence position of the user operation event on the main browser.
The user operation event is an operation performed by the user on the main browser, and is, for example, a touch click or the like. The starting and recording actions of the main browser are triggered by user operation events. Based on the occurrence position of the user operation event on the main browser, associated document object model information, for example, for verification by the auxiliary browser in a later-described verification step is selected from a plurality of document object model information associated with the occurrence position.
In step S206, the associated document object model information is sent to the auxiliary browser.
In step S208, a positioning feature is acquired based on the associated document object model information. That is, the positioning feature is separated from the associated object model information received through step S206 and recorded as a recording script during the recording process.
In step S210, the location feature is sent back to the main browser as a recorded script of the user operation event.
Therefore, because the recording script of the user operation event has the correct positioning characteristic corresponding to the user operation event, the positioning element code script can be directly utilized in the subsequent operation without being modified by the user after recording, and a large amount of complicated technical operation is omitted.
Optionally, according to an embodiment of the present invention, in the method for recording a web page operation process, step S206: sending the associated document object model information to the secondary browser, including:
step S2061 of sending a request for associated document object model information to the main browser;
step S2063 receives the associated document object model information returned from the main browser.
That is, the page displays of the main browser and the sub browser are synchronized, and the sub browser is controlled by the main browser between the main browser and the sub browser, so that the sub browser can respond to the command of the main browser in real time and synchronously. When the associated document object model information is to be sent to the auxiliary browser, an instruction needs to be sent to the main browser, the main browser sends the associated document object model information to the auxiliary browser in response to the instruction requesting the information, and the auxiliary browser receives the associated document object model information returned from the main browser.
Optionally, according to a method for recording a web page operation process in an embodiment of the present invention, in which the associated document object model information includes a key document object model information determination condition, step S204: selecting associated document object model information based on the occurrence position of the user operation event on the main browser, wherein the selection comprises the following steps:
s2041: and judging whether the associated document object model information meets the judgment condition of the key document object model information or not, and sending the associated document object model information meeting the judgment condition of the key document object model information to the auxiliary browser as the key document object model information.
By including the key document object model information judgment condition in the associated document object model information, the corresponding positioning feature can be selected more accurately, for example, the accuracy of the script recording can be greatly improved only by verifying the positioning feature corresponding to the associated document object model information of the rule, so that the problem that a large amount of inaccurate positioning features are recorded and the storage space and the processing capacity required by recording are consumed can be avoided.
Further, optionally, according to the method for recording a web page operation process in an embodiment of the present invention, the key document object model information determination condition is: the ID information in the key document object model information received by the auxiliary browser matches the ID information of the main browser at the current time. This is because the page complexity of the main browser may be very high, dynamic loading often occurs, the dynamically loaded document object model is difficult to locate, and its ID is often dynamically generated, which results in the recorded document object model feature being unable to be directly used in the second execution. To this end, the embodiment of the present invention selects only document object model information, of which ID information coincides with ID information of the current time of the main browser, among the key document object model information received by the auxiliary browser to be recorded as a recording script by defining a key document object model information judgment condition.
Optionally, according to an embodiment of the invention, the method for recording the web page operation process, wherein,
s2041: judging whether the key document object model information accords with the judgment condition of the key document object model information, and taking the document object model information which accords with the judgment condition of the key document object model information as the key document object model information, wherein the judgment condition comprises the following steps:
S2041A if the number of document object model information meeting the key document object model information judgment condition is greater than 1, selecting document object model information closest to the occurrence coordinates of the user operation event from the document object model information meeting the key document object model information judgment condition as key document object model information to be sent to the auxiliary browser.
That is, if there are a plurality of associated document object model information conforming to the key document object model information judgment condition for each web page operation process, the document object model information closest to the occurrence coordinates of the user operation event can be selected as the key document object model information to be transmitted to the auxiliary browser, from among the document object model information conforming to the key document object model information judgment condition, in the near vicinity. This can greatly reduce unnecessary duplicate recordings of scripts, thereby relieving the processor of processing pressure.
Optionally, in the method for recording a web page operation process according to an embodiment of the present invention, an initial value of the counter is set to be equal to the number of associated document object model information related to a user operation event; if the associated document object model information does not meet the key document object model information judgment condition, the value of the counter is decremented by 1, and the next document object model information next to the document object model information is taken as new key document object model information to be sent to the auxiliary browser.
That is, if the associated document object model information is found to be not in conformity with the key document object model information judgment condition once, the next document object model information next to the associated document object model information is transmitted to the auxiliary browser as new associated document object model information. This can easily exclude locating features that do not require recording, thereby avoiding recording of inaccurate recorded scripts.
Optionally, according to the method for recording the webpage operation process in an embodiment of the present invention, the auxiliary browser includes n virtual browsers respectively controlled by the main browser, where n is a positive integer greater than or equal to 2. The auxiliary browser can be a plurality of background silent-started virtual browsers, and a user cannot directly see or touch the auxiliary browser, so that the inconvenience of the user due to the fact that the number of the virtual browsers is increased cannot be caused. In theory, the more virtual browsers are, the more accurate the acquired positioning features are, and the higher the capability of effectively recording the script is, so that the user can modify the number of the auxiliary browsers in a parameter transmission manner to improve the recording accuracy of the recorded script.
Optionally, according to an embodiment of the invention, the method for recording the web page operation process, wherein,
step S202: quiescing launching of a secondary browser in response to a user-operated event on a primary browser, comprising:
step S2021 synchronously and silently launches the n virtual browsers in response to a user operation event on the main browser.
Step S210: sending the location features back to the main browser as a recorded script of the user operational event, including:
step S2101: and when judging that all the associated document object model information received from the n virtual browsers has the same ID information as the ID information of the main browser at the current moment, recording the positioning feature as a recording script of the user operation event.
By recording the positioning features as the recording script of the user operation event only when judging that each piece of associated document object model information received from the n virtual browsers has the same ID information as the ID information of the main browser at the current moment, the positioning features can be further accurately acquired, the capability of effectively recording the recording script is further improved, and the processing pressure is further reduced.
Optionally, in the method for recording an operation process of a web page according to an embodiment of the present invention, when one piece of associated document object model information among the pieces of associated document object model information received from the n virtual browsers has ID information different from the ID information of the main browser at the current time, the next piece of document object model information next to the associated document object model information of the main browser at the current time is used as new associated document object model information to be sent to the auxiliary browser. That is, when the associated document object model information received by the n virtual browsers in synchronization should have the same ID information as the ID information of the main browser at the current time, the next document object model information next to the associated document object model information of the main browser at the current time is taken as new associated document object model information to be transmitted to the auxiliary browser.
And a user monitors by relying on JavaScript when the main browser executes page operation, transmits the monitored document object model elements to the auxiliary browser for verification through ipc, monitors callback in the main process, sends a verification result back to the main browser after the verification is finished, the main browser receives the callback, records the result as a valid script if the result is correct, and switches the positioning features of the document object model to be synchronized to the auxiliary browser again if the result is wrong until the verification result is that the positioning features pass or no other features can be extracted.
In addition, as shown in fig. 3, the structure of an optional web page operation process recording system according to an embodiment of the present invention is provided.
Fig. 3 is a block diagram illustrating a recording system for web pages according to an embodiment of the present invention. In this embodiment, the web page operation process recording system includes: reading means 310, buffering means 320, counter means 330 and recording means 340. The business server includes an interface 350 for the consumer to enter a web page operating process record request. The reading device 310 is mainly used for receiving a web page operation process record request from the interface 350, and initiating reading and timing reading. The caching device 320 is mainly used for storing the configuration information and the record data as a cache in the recording process of the webpage operation process. The counter means 330 initially sets a count equal to the number of associated document object model information related to the user operation event, decrements the value of the counter by 1 when the associated document object model information does not meet the key document object model information judgment condition, and transmits the next associated document object model information next to the associated document object model information to the auxiliary browser. The recording script recording device 340 is mainly used to record the positioning features of the verified document object model elements as the recording script of the user operation event into the recording document. The interface 350 is mainly used for receiving a service request, i.e. a web page operation process record request. The web page operation process record request comes from the client or other server connected with the business server.
According to another aspect of the embodiments of the present invention, as shown in fig. 4, there is provided a web page operation process recording apparatus, including:
an auxiliary browser starting unit 401 for silently starting an auxiliary browser in response to a user operation event on the main browser;
a related document object model information selection unit 403 for selecting related document object model information based on the occurrence position of the user operation event on the main browser;
an associated document object model information transmitting unit 405 that transmits associated document object model information to the auxiliary browser;
a positioning feature obtaining unit 407 that obtains a positioning feature based on the associated document object model information;
the recording script recording unit 409 sends the positioning feature back to the main browser, and records the positioning feature as a recording script of the user operation event in a recording document.
It should be noted that the auxiliary browser starting unit 401 in this embodiment may be configured to execute step S202 in this embodiment of the present invention, the associated document object model information selecting unit 403 in this embodiment may be configured to execute step S204 in this embodiment of the present invention, the associated document object model information sending unit 405 in this embodiment may be configured to execute step S206 in this embodiment of the present invention, the positioning feature obtaining unit 407 in this embodiment may be configured to execute step S208 in this embodiment of the present invention, and the recording script recording unit 409 in this embodiment may be configured to execute step S210 in this embodiment of the present invention.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
According to another aspect of the embodiments of the present invention, the present invention provides an electronic device, as shown in fig. 5, including: the computer program comprises a memory 501, a processor 503, a communication interface 505 and a communication bus 507, wherein a computer program capable of running on the processor 503 is stored in the memory 501, the memory 501 and the processor 503 communicate with each other through the communication interface 505 and the communication bus 507, and the steps of the method are realized when the processor 503 executes the computer program.
The memory and the processor in the electronic equipment are communicated with the communication interface through a communication bus. The communication bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
There is also provided, in accordance with yet another aspect of an embodiment of the present invention, a computer-readable medium having non-volatile program code executable by a processor.
Optionally, in an embodiment of the present invention, a computer readable medium is configured to store program code for the processor to perform the following steps:
step S202, responding to a user operation event on a main browser and starting an auxiliary browser in a silent mode;
step S204, selecting associated document object model information based on the occurrence position of the user operation event on the main browser;
step S206, sending the associated document object model information to the auxiliary browser;
step S208, acquiring positioning characteristics based on the associated document object model information;
and step S210, sending the positioning feature back to the main browser to be used as a recording script of the user operation event.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
When the embodiment of the invention is specifically realized, reference can be made to the various embodiments, and corresponding technical effects are achieved.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units designed to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk. It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A method for recording a webpage operation process comprises the following steps:
quiesce launching a secondary browser in response to a user operation event on a primary browser;
selecting associated document object model information based on the occurrence position of the user operation event on the main browser;
sending the associated document object model information to the auxiliary browser;
acquiring positioning characteristics based on the associated document object model information;
and sending the positioning feature back to the main browser as a recording script of the user operation event.
2. The web page operation process recording method according to claim 1, wherein the sending the associated document object model information to the auxiliary browser comprises:
sending a request for associated document object model information to the main browser;
and receiving the associated document object model information returned from the main browser.
3. The web page operation process recording method according to claim 1, wherein the associated document object model information contains a key document object model information judgment condition,
selecting associated document object model information based on the occurrence position of the user operation event on the main browser, wherein the selecting comprises:
judging whether the associated document object model information meets the judgment condition of the key document object model information, selecting the associated document object model information meeting the judgment condition of the key document object model information, and sending the selected associated document object model information serving as the key document object model information to the auxiliary browser.
4. The web page operation process recording method according to claim 3, wherein the key document object model information judgment condition is: and the ID information in the associated document object model information received by the auxiliary browser is consistent with the ID information of the main browser at the current moment.
5. The web page operation process recording method according to claim 3, wherein the determining whether the associated document object model information meets the key document object model information determination condition, selecting the associated document object model information meeting the key document object model information determination condition as key document object model information to be sent to the auxiliary browser, includes:
and if the number of the associated document object model information meeting the judgment condition of the key document object model information is more than 1, selecting the associated document object model information closest to the occurrence coordinate of the user operation event from the associated document object model information meeting the judgment condition of the key document object model information as the key document object model information to be sent to the auxiliary browser.
6. The web page operation procedure recording method according to claim 3, wherein,
setting an initial value of a counter equal to the number of associated document object model information related to the user operation event;
and if the associated document object model information does not meet the judgment condition of the key document object model information, subtracting 1 from the value of the counter, and sending next associated document object model information next to the associated document object model information to the auxiliary browser.
7. The web page operation process recording method according to any one of claims 1 to 6,
the auxiliary browser comprises n virtual browsers respectively controlled by the main browser, wherein n is a positive integer greater than or equal to 2.
8. The web page operation procedure recording method according to claim 7, wherein,
the quiescing launching of a secondary browser in response to a user-operated event on the primary browser, comprising: synchronously and silently starting n virtual browsers in response to a user operation event on the main browser;
the sending the positioning feature back to the main browser as a recording script of the user operation event includes: and when judging that all the associated document object model information received from the n virtual browsers has the same ID information as the ID information of the main browser at the current moment, recording the positioning feature as a recording script of the user operation event.
9. The web page operation procedure recording method according to claim 8, wherein,
and when any one piece of associated document object model information among the associated document object model information synchronously received from the n virtual browsers has ID information different from the ID information of the main browser at the current moment, synchronously transmitting the next associated document object model information of the main browser, which is next to the associated document object model information of the main browser at the current moment, to the n virtual browsers.
10. A web page operation process recording device, comprising:
the auxiliary browser starting unit responds to a user operation event on the main browser and starts the auxiliary browser in a silent mode;
a related document object model information selecting unit that selects related document object model information based on an occurrence position of the user operation event on the main browser;
a related document object model information sending unit that sends the related document object model information to the auxiliary browser;
a positioning feature obtaining unit that obtains a positioning feature based on the associated document object model information;
and the recording script recording unit is used for sending the positioning features back to the main browser to be recorded into a recording document as the recording script of the user operation event.
11. An electronic device comprising a memory, a processor, a communication interface and a communication bus, a computer program being executable on the processor being stored in the memory, the memory and the processor communicating via the communication bus and the communication interface, wherein the steps of the method of any of claims 1 to 9 are implemented when the computer program is executed by the processor.
12. A computer readable medium storing non-volatile program code executable by a processor, wherein the program code causes the processor to perform the method of any of claims 1 to 9.
CN202110599838.7A 2021-05-31 2021-05-31 Webpage operation process recording method and device, electronic equipment and computer readable medium Active CN113221042B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110599838.7A CN113221042B (en) 2021-05-31 2021-05-31 Webpage operation process recording method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110599838.7A CN113221042B (en) 2021-05-31 2021-05-31 Webpage operation process recording method and device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN113221042A true CN113221042A (en) 2021-08-06
CN113221042B CN113221042B (en) 2024-05-17

Family

ID=77081877

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110599838.7A Active CN113221042B (en) 2021-05-31 2021-05-31 Webpage operation process recording method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN113221042B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113821748A (en) * 2021-09-26 2021-12-21 杭州米络星科技(集团)有限公司 Data recording method based on webpage, server, electronic equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000076266A (en) * 1998-08-28 2000-03-14 Internatl Business Mach Corp <Ibm> System/method for automatically executing browser operation
CN102272757A (en) * 2009-01-08 2011-12-07 国际商业机器公司 Method for server-side logging of client browser state through markup language
US20140013165A1 (en) * 2007-06-05 2014-01-09 Software Research Inc. Method for System for Testing Websites
US10430212B1 (en) * 2016-07-13 2019-10-01 Screenshare Technology Ltd. Method for recording, editing and reproduction of computer session
CN111104315A (en) * 2019-11-29 2020-05-05 京东数字科技控股有限公司 Test script generation method and device and computer readable storage medium
US10853218B1 (en) * 2018-12-17 2020-12-01 Shutterstock, Inc. Recording and playback of a web browser session

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000076266A (en) * 1998-08-28 2000-03-14 Internatl Business Mach Corp <Ibm> System/method for automatically executing browser operation
US20140013165A1 (en) * 2007-06-05 2014-01-09 Software Research Inc. Method for System for Testing Websites
US20150186249A1 (en) * 2007-06-05 2015-07-02 Edward F. Miller Testing web pages using a document object model
CN102272757A (en) * 2009-01-08 2011-12-07 国际商业机器公司 Method for server-side logging of client browser state through markup language
US10430212B1 (en) * 2016-07-13 2019-10-01 Screenshare Technology Ltd. Method for recording, editing and reproduction of computer session
US10853218B1 (en) * 2018-12-17 2020-12-01 Shutterstock, Inc. Recording and playback of a web browser session
CN111104315A (en) * 2019-11-29 2020-05-05 京东数字科技控股有限公司 Test script generation method and device and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113821748A (en) * 2021-09-26 2021-12-21 杭州米络星科技(集团)有限公司 Data recording method based on webpage, server, electronic equipment and medium
CN113821748B (en) * 2021-09-26 2023-11-07 杭州米络星科技(集团)有限公司 Webpage-based data recording method, server, electronic equipment and medium

Also Published As

Publication number Publication date
CN113221042B (en) 2024-05-17

Similar Documents

Publication Publication Date Title
US8745164B2 (en) Method and system to detect a cached web page
CN111177165B (en) Method, device and equipment for detecting data consistency
US20150106827A1 (en) Rpc acceleration based on previously memorized flows
CN113407383B (en) Main and standby system switching method and device, server and main and standby system
JP7282133B2 (en) Browser display verification method, device, computer equipment and storage medium
CN111600885A (en) SQL injection vulnerability detection method and device, equipment and storage medium
US20230221952A1 (en) Disabling a script based on indications of unsuccessful execution of the script
CN108021409B (en) APP service scenario restoration method and system
CN113221042A (en) Webpage operation process recording method and device, electronic equipment and computer readable medium
CN113238815A (en) Interface access control method, device, equipment and storage medium
CN109669642B (en) Node joining method, system and device of storage system and readable storage medium
CN109542850B (en) Method, device, equipment and medium for updating WORM attribute of file
WO2023103844A1 (en) Data processing method and apparatus
CN110825603A (en) Page first loading time determining method and device, electronic equipment and storage medium
CN110930253A (en) Intelligent contract internal main key generation method and device, computer equipment and storage medium
CN107368376B (en) Message sending method and device, expansion method and terminal
CN113840313B (en) Network mode control method and device of mobile terminal and computer equipment
WO2021168654A1 (en) Method and apparatus for detecting synchronized data, server, and data synchronization system
CN114691703A (en) Data updating method and device, electronic equipment and storage medium
CN114143219A (en) Network monitoring method, device, medium and equipment of B/S system architecture
CN107995063B (en) Network detection method, device, terminal and computer readable storage medium
CN113138814A (en) Remote assistance method, device, equipment and storage medium
CN111061633A (en) Method, device, terminal and medium for detecting first screen time of webpage
CN113409816B (en) Audio-frequency clamping-on detection method, device, computer equipment and storage medium
CN111913914B (en) File processing method and device, electronic equipment and storage medium

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