CN113190435A - Information acquisition method and device, electronic equipment and storage medium - Google Patents

Information acquisition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113190435A
CN113190435A CN202110402241.9A CN202110402241A CN113190435A CN 113190435 A CN113190435 A CN 113190435A CN 202110402241 A CN202110402241 A CN 202110402241A CN 113190435 A CN113190435 A CN 113190435A
Authority
CN
China
Prior art keywords
carrier object
remote debugging
carrier
information
creating
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.)
Pending
Application number
CN202110402241.9A
Other languages
Chinese (zh)
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.)
Bigo Technology Pte Ltd
Original Assignee
Bigo Technology Pte 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 Bigo Technology Pte Ltd filed Critical Bigo Technology Pte Ltd
Priority to CN202110402241.9A priority Critical patent/CN113190435A/en
Publication of CN113190435A publication Critical patent/CN113190435A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses an information acquisition method, an information acquisition device and electronic equipment, wherein the method comprises the following steps: creating a carrier object supporting remote debugging and obtaining a remote debugging address, wherein the carrier object is used for carrying information; according to the remote debugging address, a driving object used for carrying out data interaction with the carrier object is established; sending a data request to the carrier object based on the driver object; and acquiring the target information according to the response message returned by the carrier object. The method enables an application program, such as a Selenium tool, to conveniently acquire target information from a network.

Description

Information acquisition method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to an information obtaining method, an information obtaining apparatus, an electronic device, and a computer-readable storage medium.
Background
With the continuous development of the internet, the information presentation in the network has increased explosively, which makes it more difficult for users to retrieve information; therefore, it is generally required that an application automatically collects and collates information in a network, so that when a user retrieves the information, an electronic device can quickly and accurately provide target information to the user based on the information collected and collated in advance by the application, wherein the application may be a web automation testing framework, that is, an automation tool applied to the web, such as a Selenium tool.
However, with the continuous development of internet technology, at present, when a website is constructed, a static webpage technology is often not used, but a dynamic webpage technology is used to construct a webpage, which brings certain difficulty to an application program to automatically collect information, and especially, when a website in a network needs to be logged in and identity authentication exists, the application program is more difficult to automatically acquire information in the website.
Disclosure of Invention
The embodiment of the disclosure provides an information acquisition method, an information acquisition device, an electronic device and a storage medium, so that an application program can conveniently collect information from a network.
In a first aspect of the present disclosure, an information obtaining method is provided, where the method includes:
creating a carrier object supporting remote debugging and obtaining a remote debugging address, wherein the carrier object is used for carrying information;
according to the remote debugging address, a driving object used for carrying out data interaction with the carrier object is established;
sending a data request to the carrier object based on the driver object; and the number of the first and second groups,
and obtaining target information according to the response message returned by the carrier object.
In a second aspect of the present disclosure, there is also provided an information acquiring apparatus, including:
the remote debugging device comprises a carrier object creating module, a remote debugging module and a debugging module, wherein the carrier object creating module is used for creating a carrier object supporting remote debugging and obtaining a remote debugging address, and the carrier object is used for carrying information;
the driving object creating module is used for creating a driving object used for carrying out data interaction with the carrier object according to the remote debugging address;
a data request sending module, configured to send a data request to the carrier object based on the driver object; and the number of the first and second groups,
and the target information obtaining module is used for obtaining the target information according to the response message returned by the carrier object.
In a third aspect of the present disclosure, there is also provided an electronic device, including:
a memory for storing executable instructions;
a processor for operating the electronic device to perform the method according to the first aspect of the disclosure, according to the control of the executable instructions.
In a fourth aspect of the present disclosure, a computer-readable storage medium is also provided, which stores a computer program readable and executable by a computer, and the computer program is configured to execute the method according to the first aspect of the present disclosure when the computer program is read and executed by the computer.
The method has the advantages that according to the method disclosed by the embodiment of the invention, when the application program needs to automatically acquire information, the remote debugging address is obtained by creating the carrier object supporting the remote debugging; then, based on the remote debugging address, a driving object capable of carrying out data interaction with the carrier object is created; then, the application program can send a data request to the carrier object based on the driving object, and obtain the target information based on the response message returned by the carrier object. The method comprises the steps that a carrier object is created, and data interaction is carried out between a driving object corresponding to the carrier object and the carrier object, so that an application program can interact with website elements in the carrier object, and target information can be dynamically acquired; meanwhile, because the method uses the driving object corresponding to the carrier object to directly carry out data interaction with the inner core of the carrier object, the problem of authentication failure caused by processing such as login authentication, identity authentication and the like in the existing website can be avoided, and therefore the application program can conveniently collect the target information from the network.
Other features of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic flowchart of an information acquisition method provided in an embodiment of the present disclosure.
Fig. 2 is a schematic diagram of a framework of information acquisition processing provided by an embodiment of the present disclosure.
Fig. 3 is a schematic block diagram of an information acquisition apparatus provided in an embodiment of the present disclosure.
Fig. 4 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
< method examples >
In carrying out the present application, the inventors discovered that in order to achieve automatic information gathering from the network, a web crawler (web crawler), i.e., a crawler technology, can be generally used to obtain the information. In the early stage of the internet, aiming at a website constructed by a static webpage technology in the network, the information can be conveniently acquired by the method; with the continuous development of internet technology, after the internet enters a stage of building a webpage by using a dynamic webpage technology, in order to increase user viscosity, a website usually needs to log in to execute other operations, and in the stage, an application program, for example, a web automation test framework is generally utilized to simulate user login and simulate operations such as clicking and page turning, so that the purpose of collecting information in the website is achieved; however, in recent years, the introduction of authentication processing into websites, i.e. processing for identifying whether the current login behavior is operated by a user or a machine, such as intercepting the application program by means of an authentication code, a slider and a browser fingerprint, has been started, which makes it increasingly difficult for the application program to conveniently acquire information from a network.
It should be noted that a static web page refers to a page whose page codes are all composed of commands provided in hypertext Markup Language (HTML); a dynamic web page is a web page structure opposite to a static web page, and the specific implementation process is not described herein again; in addition, the web automation test framework is an automation tool applied to the web, and can be directly run in a browser and simulate the behavior of a user operating a web page, for example, simulate the user to click, view, page, fill in information, and the like.
In order to solve the problem that the existing electronic device is difficult to conveniently acquire information from a network, an embodiment of the present disclosure provides an information acquisition method, please refer to fig. 1, which is a schematic flow diagram of the information acquisition method provided by the embodiment of the present disclosure. The method may be implemented by an application for automatically collecting information, which may be, for example, a web automation testing framework, i.e., an automation tool; more specifically, the application may be a Selenium tool; in the present embodiment, unless otherwise specified, the Selenium tool is taken as an example of an application program for implementing the method, but it is needless to say that the method may be implemented by other types of application programs or other automation tools in specific implementation, and the method is not limited herein.
As shown in FIG. 1, the method of the present embodiment may include the following steps S1100-S1400, which are described in detail below.
Step S1100, a carrier object supporting remote debugging is created, and a remote debugging address is obtained, wherein the carrier object is used for carrying information.
The carrier object can be an application program used for retrieving, carrying and transmitting webpage information resources; in this embodiment, the carrier object may be a browser, for example, a Chrome browser, a Firefox browser, an IE browser, a Safari browser, and the like; in addition, if not specifically stated, in this embodiment, a carrier object is taken as a Chrome browser for example; of course, in specific implementation, the carrier object may also be other applications, for example, an application program integrated with a browser kernel, or may also be other browsers, which is not limited herein.
Specifically, in order to conveniently acquire information from websites, especially websites including login authentication and identity authentication, the present embodiment creates a carrier object supporting remote debugging and a driver object performing data interaction with the carrier object by an application program, for example, a Selenium tool Script (Script), and performs data interaction with the carrier object based on the driver object, so that in the case that a target website includes login authentication and/or identity authentication, the application program can successfully log in the target website to acquire information in the target website after logging in, and first, detailed description is made on how to create a carrier object supporting remote debugging.
In one embodiment, the creating a carrier object supporting remote debugging and obtaining a remote debugging address includes any one of the following: creating the carrier object by a preset instruction in a command line tool to obtain the remote debugging address; and creating the carrier object by using an object creation interface provided by a preset tool to obtain the remote debugging address.
Here, a carrier object is taken as a Chrome browser for example, in a specific implementation, the carrier object is created by using a preset instruction in a command line tool, and the remote debug address is obtained, where an instance of the Chrome browser is created in the command line tool of a Windows operating system by using an instruction "Chrome, exe, remote-debug, port, user-data-dir, user-personal-data storage path", and after the creation is successful, a remote debug address corresponding to the instance is obtained, where the remote debug address may be a combination of an internet protocol address (i.e., an IP address) of a system and a port number specified in the instruction, specifically, the remote debug address is an "IP address: the port number "form, for example, in the case where the system IP address is" 127.0.0.1 "and the port number specified in the instruction is" 9222 ", the remote debugging address of the browser instance may be" 127.0.0.1:9222 ".
In an embodiment, the carrier object is created by using an object creation interface provided by a preset tool, the remote debugging address is obtained, and specifically, the carrier object supporting remote debugging may be created by using a development kit provided by a third-party tool in a program instruction, and the remote debugging address is obtained.
For example, in the case where the carrier object is a Chrome browser, a script for creating an instance may be written using python language, in which an instance of a Chrome browser is created by importing a PychromeDevTools toolkit and by executing an instruction "PychromeDevTools Chrome ═ pyromedevtools.
It should be noted that, in the implementation, the carrier object supporting remote debugging may also be created by other methods, and is not limited specifically here.
As can be seen from the above description, in this embodiment, the carrier object supporting remote debugging may be an object that starts a remote debugging mode of an instance through a parameter when the browser instance is created, so that an application program, for example, a Selenium tool may directly perform data interaction with a kernel of the carrier object by using a preset remote debugging protocol corresponding to the carrier object, where the preset remote debugging protocol may be a cdp (Chrome Debug protocol) protocol when the carrier object is a Chrome browser.
For example, when the carrier object is a Chrome browser, after the Chrome browser is normally started, a CDP developer panel may be opened through the shortcut key F12, where the panel includes several panels and each panel includes a corresponding function, for example, an Element panel, which may be used to search for a tag Element in a web page source code; the Console panel is used for recording log information in the development process of a developer and can be used as a command parser, namely, shell and JavaScript, namely js script interaction; the Source panel can be used for debugging js script at break points; the Network panel can be used for checking various Network requests; the Timeline panel can be used for recording and analyzing various events occurring in the life cycle of the website; the Profiles panel can be used for acquiring more information in cooperation with Timeline; the Application panel can be used for recording all resource information of the website; in practice, when the user operates on the CDP developer panel, the user performs data interaction with the Chrome kernel based on the CDP protocol corresponding to the Chrome browser.
It should be noted that, since each panel in the CDP developer panel and the related descriptions of the shell, js, etc. are described in detail in the prior art, no further description is given in this embodiment; in addition, the carrier object is exemplified as a Chrome browser, and in a specific implementation, when the carrier object is another object, for example, a browser such as a Firefox browser, an IE browser, and a Safari browser, a remote debugging protocol corresponding to the browser may be used to perform data interaction with a kernel thereof, which is not described herein again.
It should be further noted that, in this embodiment, an application program running in the electronic device, for example, a Selenium tool, automatically implements the method without User operation, so as to further facilitate the application program to obtain information in the network, when a carrier object supporting remote debugging is created during specific implementation, the carrier object may also be created in an Interface-free manner, so that the application program may automatically obtain information in the network without opening a Graphical User Interface (GUI) of the carrier object; in this way, since the interface-less carrier object can conveniently run the automation tool and be controlled by the program instructions compared with the interface-bounded carrier object, the speed of information acquisition can be increased, and meanwhile, since the interference of external factors can be reduced in this way, the overall robustness can be improved.
In specific implementation, when the carrier object is created, the interface-free form of the carrier object may be started in a manner of specifying a parameter, for example, when the carrier object is a Chrome browser and an instance of the carrier object is created, the interface-free form of the carrier object may be started by specifying a parameter "- -thread", which is not described herein again.
Step S1200, creating a driver object for performing data interaction with the carrier object according to the remote debug address.
In step S1100, how to create a carrier object supporting remote debugging is described in detail, and after creating the carrier object and obtaining a remote debugging address, a driver object for performing data interaction with the carrier object may be created according to the remote debugging address.
Here, the carrier object is still exemplified as a Chrome browser, and the driving object may be an object created by a webdriver.chrome method, where the webdriver.chrome is a class inherited from a remotewebdriver, and in a specific implementation, the driving object may be obtained by, for example, a similar program instruction "webdriver.chrome ()"; of course, when the carrier object is another object, for example, a Firefox browser, the driver object can be obtained by a similar program instruction "driver ═ webdriver. Firefox ()", and details thereof are not described here.
Step S1300, sending a data request to the carrier object based on the driving object.
Specifically, after the carrier object and the driver object corresponding to the carrier object are respectively created through the above steps, data interaction may be performed with the carrier object based on the driver object to obtain target information in the target website.
In this embodiment, the target information is information to be acquired from a network by an application, for example, a Selenium tool, and may specifically be information in a target website, where the information may be a text, an image, an audio, a video, and the like, and is not limited herein.
For example, after the driver object is created in the above manner, when the target information needs to be obtained from the website http:// xxx.com, a connection channel for accessing the website can be established by instructing the driver.get ('http:// xxx.com') to obtain the target information from the website based on the connection channel.
In one embodiment, when a target website includes login verification processing, a login request is sent to the target website based on the driving object, wherein the target website includes the target information to be acquired, and the login request includes account information for logging in the target website.
Specifically, if the target site includes the login verification process, a login request may be transmitted to the target site based on the driver object created in the script of the selenium tool.
For example, account information for login may be sent to the carrier object through the following instruction set in the script, and a login operation is performed:
driver.findElement(By.id("username")).clear();
driver.findElement(By.id("username")).sendKeys(username);
driver.findElement(By.id("pwd")).clear();
driver.findElement(By.id("pwd")).sendKeys(pwd);
driver.findElement(By.id("Submit")).click()。
it should be noted that, driver. findelement () is an interface provided in a driver class corresponding to a carrier object and used for searching for a website element, and a detailed usage method thereof is not described herein again.
In addition, when the target website includes an authentication process, for example, an authentication process including an authentication code, a slider, user fingerprint detection, and the like, the user operation may also be simulated based on the driving object to pass the authentication process, and detailed processing procedures thereof are not described herein again.
As can be seen from the above description, in an implementation, the sending a data request to the carrier object based on the driver object specifically includes: and sending a data request for interacting with website elements to the carrier object based on an interface provided by the driving object, wherein the website elements are page elements for constructing the target website.
Specifically, the website element may be a page element for constructing a web page, and may be, for example, a form, a text box, a scroll bar, or other elements.
In specific implementation, an interface provided by the driver object performs data interaction with the carrier object based on a preset remote debugging protocol, wherein the preset remote debugging protocol corresponds to the carrier object; for example, when the carrier object is a Chrome browser, the preset remote debugging protocol may be the remote debugging protocol corresponding to the Chrome browser and described in step S1100, which is not described herein again.
In one embodiment, the interface comprises at least one of: pointer operation interface, window switching interface, website element operation interface and script injection interface.
The pointer operation interface may be, for example, an interface provided in an ActionChains class, a drag _ and _ drop class, or the like, and, for example, in a case where the target website includes the authentication processing, an operation such as a slider movement, a drag, or the like may be implemented through the interface to pass the authentication processing of the target website.
The window switching interface may be, for example, an interface provided in a frame class, so as to implement frame switching between different web pages.
The website element operation interface is an interface for operating elements in a website, wherein the website elements may be buttons, text input boxes, and the like.
The script injection interface is an interface for injecting JavaScript, that is, js code to implement operations such as page turning, clicking, and the like, and may be specifically an interface provided by an execute _ script class when specifically implemented.
It should be noted that, in specific implementation, the interface provided by the driver object corresponding to the carrier object may further include interfaces with other functions, for example, an interface for searching elements, an interface for indicating waiting, and an interface for operating cookies, which is not described herein again.
Step S1400, according to the response message returned by the carrier object, the target information is obtained.
In a specific implementation, after creating the carrier object and the driver object corresponding to the carrier object, an application, for example, a Selenium tool, may access the target website by using the driver object, and send a data request for obtaining target information to the target website, so as to obtain the target information, for example, information such as text, image, video, etc., in the target website from a response message corresponding to the data request.
In one embodiment, after obtaining the target information, the method further comprises: and storing the target information. That is, in obtaining the target information, the application program may store the target information in the local disk or in the database, so that the electronic device may conveniently and quickly provide the target information to the user when the user retrieves the target information.
Please refer to fig. 2, which is a schematic diagram of a framework of an information obtaining process provided by an embodiment of the present disclosure, specifically, when an application, for example, the Selenium tool shown in fig. 2 needs to automatically obtain target information in a website, for example, needs to obtain information in a target website opened in a Chrome browser, an information obtaining script may be run by using the Selenium tool to create a Chrome browser instance supporting remote debugging, and a driving object for data interaction with the instance is created based on a created remote debugging address; then, a data request may be sent to the instance based on the driver object, for example, to send an access target website, a login, and after the login is successful, target information may be obtained from the target website through interfaces provided by various tool classes, for example, an ActionChains class, a frame switching class, an element operation class, a CSS selection class, and an Xpath selector; after the target information is acquired from the target website, the target information can be stored in the database in a persistent mode and sorted, for example, index information of the target information is established, so that when a user retrieves the target information, the electronic device can quickly and accurately provide the target information for the user. It should be noted that, in the specific implementation, the instruction for creating the carrier object instance and the instruction for creating the driver object may also be integrated into the script for acquiring information, so that the effect of using the Selenium to directly run one script to complete all processing and obtain the target information is achieved.
In summary, in the method provided in this embodiment, when the application needs to automatically acquire information, a remote debugging address is obtained by creating a carrier object supporting remote debugging; then, based on the remote debugging address, a driving object capable of carrying out data interaction with the carrier object is created; then, the application program can send a data request to the carrier object based on the driving object, and obtain the target information based on the response message returned by the carrier object. The method can enable the application program to interact with the website elements in the carrier object by creating the carrier object and using the driving object corresponding to the carrier object to perform data interaction with the carrier object so as to dynamically acquire the target information; meanwhile, because the method uses the driving object corresponding to the carrier object to directly carry out data interaction with the inner core of the carrier object, the problem of verification failure caused by login verification in the existing website can be avoided, and therefore the electronic equipment can conveniently collect information in the network.
< apparatus embodiment >
Corresponding to the above embodiments, in the present embodiment, there is also provided an information acquisition apparatus, as shown in fig. 3, the apparatus 3000 may include a carrier object creation module 3100, a driver object creation module 3200, a data request transmission module 3300, and a target information acquisition module 3400.
The carrier object creating module 3100 is configured to create a carrier object supporting remote debugging, and obtain a remote debugging address, where the carrier object is used to carry information; the driving object creating module 3200 is configured to create a driving object for performing data interaction with the carrier object according to the remote debugging address; the data request sending module 3300 is used for sending a data request to the carrier object based on the drive object; and the target information obtaining module 3400 is configured to obtain the target information according to a response message returned by the carrier object.
< apparatus embodiment >
In this embodiment, an electronic device is also provided, as shown in fig. 4, the electronic device 4000 may further include a processor 4200 and a memory 4100, the memory 4100 being configured to store executable instructions; the processor 4200 is configured to operate the electronic device to perform a method according to any embodiment of the present disclosure under the control of instructions.
The electronic device 4000 may be a server, or may be other types of devices, such as a terminal device, and is not limited herein.
< media examples >
Corresponding to the above method embodiments, in this embodiment, a computer-readable storage medium is further provided, where a computer program that can be read and executed by a computer is stored, and when the computer program is read and executed by the computer, the computer program is configured to perform the method according to any of the above embodiments of the present disclosure.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.

Claims (10)

1. An information acquisition method, comprising:
creating a carrier object supporting remote debugging and obtaining a remote debugging address, wherein the carrier object is used for carrying information;
according to the remote debugging address, a driving object used for carrying out data interaction with the carrier object is established;
sending a data request to the carrier object based on the driver object; and the number of the first and second groups,
and obtaining target information according to the response message returned by the carrier object.
2. The method of claim 1, wherein prior to said sending a data request to said carrier object based on said driver object, said method further comprises:
and under the condition that a target website contains login verification processing, sending a login request to the target website based on the driving object, wherein the target website contains the target information to be acquired, and the login request comprises account information for logging in the target website.
3. The method of claim 2, wherein sending a data request to the carrier object based on the driver object comprises:
and sending a data request for interacting with website elements to the carrier object based on an interface provided by the driving object, wherein the website elements are elements for constructing the target website.
4. The method according to claim 3, wherein the interface provided by the driver object performs data interaction with the carrier object based on a preset remote debugging protocol, wherein the preset remote debugging protocol corresponds to the carrier object.
5. The method of claim 3, wherein the interface comprises at least one of: pointer operation interface, window switching interface, website element operation interface and script injection interface.
6. The method according to claim 1, wherein the creating a carrier object supporting remote debugging and obtaining a remote debugging address comprises any one of the following steps:
creating the carrier object by a preset instruction in a command line tool to obtain the remote debugging address;
and creating the carrier object by using an object creation interface provided by a preset tool to obtain the remote debugging address.
7. The method of claim 1, wherein after obtaining the target information, the method further comprises:
and storing the target information.
8. An information acquisition apparatus characterized by comprising:
the remote debugging device comprises a carrier object creating module, a remote debugging module and a debugging module, wherein the carrier object creating module is used for creating a carrier object supporting remote debugging and obtaining a remote debugging address, and the carrier object is used for carrying information;
the driving object creating module is used for creating a driving object used for carrying out data interaction with the carrier object according to the remote debugging address;
a data request sending module, configured to send a data request to the carrier object based on the driver object; and the number of the first and second groups,
and the target information obtaining module is used for obtaining the target information according to the response message returned by the carrier object.
9. An electronic device, comprising:
a memory for storing executable instructions;
a processor configured to execute the electronic device to perform the method according to the control of the instruction, wherein the method is as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which is readable and executable by a computer, and which, when read by the computer, is adapted to perform the method according to any one of claims 1 to 7.
CN202110402241.9A 2021-04-14 2021-04-14 Information acquisition method and device, electronic equipment and storage medium Pending CN113190435A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110402241.9A CN113190435A (en) 2021-04-14 2021-04-14 Information acquisition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110402241.9A CN113190435A (en) 2021-04-14 2021-04-14 Information acquisition method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113190435A true CN113190435A (en) 2021-07-30

Family

ID=76973996

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110402241.9A Pending CN113190435A (en) 2021-04-14 2021-04-14 Information acquisition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113190435A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108446230A (en) * 2018-03-19 2018-08-24 南京邮电大学 A kind of Java test code quality evaluation methods of web oriented Driver
CN110297771A (en) * 2019-06-19 2019-10-01 中信梧桐港供应链管理有限公司 Distributed test method and device for the warehouse receipt page

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108446230A (en) * 2018-03-19 2018-08-24 南京邮电大学 A kind of Java test code quality evaluation methods of web oriented Driver
CN110297771A (en) * 2019-06-19 2019-10-01 中信梧桐港供应链管理有限公司 Distributed test method and device for the warehouse receipt page

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
NULL_ICE: "Chrome remote debugging protocol在自动化测试中的应用和实践", pages 1 - 5, Retrieved from the Internet <URL:https://www.jianshu.com/p/195ff63921de> *
染卷: "python+selenium+chrome调试模式登录淘宝规避登陆滑动条检测", pages 1 - 6, Retrieved from the Internet <URL:https://ranjuan.cn/python-selenium-chrome-debug-login-taobao/> *

Similar Documents

Publication Publication Date Title
AU2017258963B2 (en) Simultaneous multi-platform testing
US10698702B1 (en) Automating interactions with software user interface
US7810070B2 (en) System and method for software testing
EP2374078B1 (en) Method for server-side logging of client browser state through markup language
US7979849B2 (en) Automatic model-based testing
US20060101404A1 (en) Automated system for tresting a web application
WO2013138919A1 (en) Systems and methods for building a universal intelligent assistant with learning capabilities
EP3333712A2 (en) Simultaneous multi-platform testing
RU2611961C2 (en) Method and system of regression testing of web page functionality, machine-readable data storage media
Amalfitano et al. The DynaRIA tool for the comprehension of Ajax web applications by dynamic analysis
US10846206B2 (en) Adaptive software testing
US20160034378A1 (en) Method and system for testing page link addresses
CN107038117B (en) Web automatic testing method based on definition-reference between event processing functions
US20170220631A1 (en) Capturing Intended Selection of Content Due to Dynamically Shifting Content
US10599750B2 (en) Capturing an application state in a conversation
KR20100069147A (en) Method and apparatus for testing quality of website
Lee et al. Test command auto-wait mechanisms for record and playback-style web application testing
Sams Selenium Essentials
CN113190435A (en) Information acquisition method and device, electronic equipment and storage medium
Bartoli et al. Recording and replaying navigations on AJAX web sites
US10642915B2 (en) System and method for automatic advancement of navigation through a user interface
Salama “Down With Regression!”–Generating Test Suites for the Web
Lempola Comparing automatic accessibility testing tools
CN115905661A (en) Automatic crawling method and device for webpage data, computer equipment and medium
CN117950991A (en) Program testing method, device, electronic equipment and computer readable 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