A continuous clicking method, system and storage medium for APP interface elements
By establishing dialogue and building http requests on the Appium client, efficient continuous clicking of APP interface elements is achieved, solving the problems of large continuous click intervals and large fluctuations in the prior art.
Patent Information
- Application Number
- CN202111146175.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2041-09-28
AI Technical Summary
In the APP automation test, the interval time of continuous click elements is large and the fluctuation range is large, which cannot meet the needs of efficient continuous clicks.
By establishing the current conversation on the Appium client, obtaining the coordinates of the element to be clicked in the software to be tested and the dialogue identifier of the Appium client, building an http request with the coordinates and dialogue identifier, and continuously sending the http request to the Appium server to realize continuous clicking of the element.
It realizes efficient continuous clicking, with a stable interval of within 200 milliseconds, with small fluctuations, which solves the problem that native functions cannot meet efficient continuous clicking.
Smart Images

Figure CN113886231B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of testing, and in particular to a method, system and storage medium for continuously clicking on APP interface elements. Background Art
[0002] Appium is a widely used open source automated testing framework for APPs worldwide. In actual APP automated testing work, it is generally used in conjunction with an open source automated testing framework. The core of Appium is a web server that exposes the REST API. It accepts connections from clients, listens for commands and executes them on mobile devices, and provides Appium-related functions for the framework, including the function of clicking on elements. The existing open source automated testing framework is generally the Robot Framework. The existing technology generally uses the AppiumLibrary library and the Appium client in the Robot Framework to implement click elements, and then realize continuous clicks on a certain element of the APP to obtain test data.
[0003] However, when you need to click on an element continuously, you usually send a request by calling the Click Element method of the Robot Framework's AppiumLibrary continuously. In this continuous click method, each click needs to be processed by the Click Element method in the Robot Framework to build an http request. Figure 1 The interval between consecutive clicks is large, generally more than 200 milliseconds, and the interval between adjacent clicks has a large fluctuation range, even reaching more than 3000 milliseconds.
[0004] The purpose of the present invention is to design a continuous clicking method, system and storage medium for APP interface elements in view of the above-mentioned problems in the prior art. Summary of the invention
[0005] In view of the problems existing in the above-mentioned prior art, the present invention provides a method, system and storage medium for continuous clicking of APP interface elements, which can effectively solve the problems existing in the above-mentioned prior art.
[0006] The technical solution of the present invention is:
[0007] A method for continuously clicking on an APP interface element comprises the following steps:
[0008] Establish the current session in the Appium client and connect to the terminal where the software to be tested is installed;
[0009] Get the coordinates of the element to be clicked in the interface of the software to be tested;
[0010] Get the conversation ID of the current conversation in the Appium client;
[0011] Constructing an http request with the coordinates and the session identifier;
[0012] The http request is continuously sent to the Appium server to realize continuous clicking of the element to be clicked.
[0013] Further, after the terminal with the software to be tested installed is connected, the following steps are executed:
[0014] An opening instruction is sent to the terminal through the current dialogue to open the software to be tested.
[0015] Furthermore, the conversation identifier of the current conversation in the Appium client is obtained, and the specific steps include:
[0016] Use Robot Framework to call the Get Appium SessionId method of AppiumLibrary to obtain the conversation identifier of the current conversation in the Appium client.
[0017] Furthermore, the Post Request method of RequestsLibrary is called by Robot Framework to construct the http request.
[0018] Furthermore, the address of the http request includes the conversation identifier, and the request body of the http request includes the coordinates.
[0019] Further, the http request is continuously sent to the Appium server to realize continuous clicking of the element to be clicked, and the specific steps include:
[0020] Create automated test scripts using Robot Framework;
[0021] The automated test script continuously sends the http request to the Appium server, and the Appium server parses the http request to obtain corresponding instructions. The Appium server sends the instructions to the terminal, thereby realizing continuous clicking of the element to be clicked.
[0022] Furthermore, in the step of obtaining the coordinates of the element to be clicked in the interface of the software to be tested, the coordinates are obtained by calling an element positioning function of the Appium client.
[0023] A continuous click system for APP interface elements, based on an Appium client, wherein the Appium client is communicatively connected to a terminal installed with software to be tested, wherein the software to be tested includes elements to be clicked, and the system includes the following modules:
[0024] The connection module is used to establish the current session in the Appium client and connect to the terminal where the software to be tested is installed;
[0025] The coordinate acquisition module is used to obtain the coordinates of the elements to be clicked in the interface of the software to be tested;
[0026] Get the identification module, which is used to get the conversation identification of the current conversation in the Appium client;
[0027] An http request building module, used for building an http request with the coordinates and the conversation identifier;
[0028] The continuous click instruction sending module is used to continuously send the http request to the Appium server to realize continuous clicking of the element to be clicked.
[0029] Furthermore, the continuous click instruction sending module includes:
[0030] The script creation submodule is used to create automated test scripts using Robot Framework;
[0031] The connection submodule is used for automated test scripts to control the Appium client to connect to the software under test;
[0032] The request sending submodule is used to continuously send the http request to the Appium server through the automated test script, parse the http request through the Appium server to obtain the corresponding instruction, and the Appium server sends the instruction to the terminal, thereby realizing continuous clicking of the element to be clicked.
[0033] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned method for continuously clicking on an APP interface element.
[0034] Therefore, the present invention provides the following effects and / or advantages:
[0035] The present invention realizes a method for performing efficient continuous clicks on elements based on the automated test process of Appium, and solves the problem that the native function cannot meet the efficient continuous clicks. The prior art either modifies the allowed interval time of continuous clicks of the object under test, and this method needs to modify the program of the object under test, which increases the workload, and at the same time cannot well simulate the real allowed time interval of continuous clicks of the object under test, or performs some operations on the system running the object under test, and then remotely calls the system script by creating a system script, so as to realize continuous clicks on the object under test by the system script. Due to the differences in different system environments, this method is unstable and not universal. At the same time, due to the differences in system permissions, such as no write permission, this method cannot be realized in some system conditions. Therefore, the technical means adopted by the present invention is a universal method, which solves the problems of poor versatility, weak simulation, and poor stability in the prior art solutions.
[0036] The present invention obtains coordinates and conversation identifiers, constructs corresponding HTTP requests, and then
[0037] The request is sent to the Appium server multiple times to click on the software under test on the terminal. Through such a complete process, the continuous clicking method is realized.
[0038] The present invention creates an http request including a conversation identifier and coordinates, sends the http request to the Appium server for multiple consecutive times through an automatic test script, and sends multiple consecutive click instructions to the terminal through the Appium server. The entire process only requires constructing an http request once, the http request includes the coordinates and the conversation identifier, and then continuously sends the http request to complete the continuous click instruction. The traditional method of constructing multiple http requests and sending multiple http requests has been changed, saving the time-consuming processing required by each call through the Robot Framework, and at the same time making the performance of continuous clicks stable, with short intervals and small fluctuations.
[0039] The http request constructed by the present invention includes the coordinates and the conversation identifier. It only needs to directly call the constructed http request and send the http request continuously and multiple times. When the automated test script issues an operation request, the conversation identifier it carries is a unique identifier, representing the device that is opened. The Appium client will retrieve the conversation according to the conversation identifier. In the continuous click operation behavior, the configuration information stored in the Session object will not be lost, but will continue to exist throughout the conversation. The connection between the Appium client and the software to be tested will not be disconnected during the entire test process, and there is no need to send a request with configuration information every time.
[0040] It is to be understood that both the foregoing general description and the following detailed description of the present invention are exemplary and explanatory and are intended to provide further explanation of the invention as claimed. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of the execution log of the existing continuous click method.
[0042] Figure 2 It is a schematic diagram of the process of the present invention.
[0043] Figure 3 This is a schematic diagram of the execution log of the continuous clicking method provided by the present invention. DETAILED DESCRIPTION
[0044] In order to facilitate understanding by those skilled in the art, the present invention is now described in further detail with reference to the accompanying drawings:
[0045] In order to make the purpose, 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 in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0046] refer to Figure 2 , a continuous clicking method for APP interface elements, comprising the following steps:
[0047] S0, initialization step, establishes the current dialogue in the Appium client and connects to the terminal where the software to be tested is installed. Specifically, the Appium client is started, the Appium client is controlled to connect to the terminal where the software to be tested is installed, the Appium client is controlled to create a corresponding dialogue, and an open instruction is sent to the terminal through the dialogue to open the software to be tested. The purpose of this step is to initialize the Appium client and establish a connection with the terminal where the software to be tested is located.
[0048] Appium is an open source, cross-platform automated testing tool that supports iOS, Android and FirefoxOS platforms. With Appium, developers can test mobile applications without recompiling the app or making any adjustments, and can enable test code to access backend APIs and databases.
[0049] In this embodiment, the Appium client is different from the device where the software to be tested is installed. The Appium client is installed on a device with supported OSX, Windows and Linux systems, such as a computer, MAC, etc. First, the Appium client communicates with the device where the software to be tested is installed, which can be WIFI or a data cable connection. Then, the system device where the APP to be tested is connected to realize that the Appium client can find the terminal where the corresponding software to be tested is located. If the terminal is an Android device, adb is used to connect to the software to be tested. If the terminal is an iOS device, xcode is used to connect to the software to be tested. Among them, Android Debug Bridge (adb) is a versatile command line tool that can communicate with Android devices. The adb command can be used to perform various device operations and provide corresponding access rights; Xcode is an integrated development tool (IDE) running on the operating system Mac OS X. Xcode has a unified user interface design and can complete coding, testing, and debugging. After finding the terminal, the Robot Framework is controlled to call the Open Application of AppiumLibrary to connect the Appium client and control the Appium client to create a corresponding dialogue, and the open command is sent to the terminal through the dialogue to open the software to be tested. Robot Framework is an extensible test automation framework for end-to-end acceptance testing and acceptance test-driven development (ATDD). It can be used to test distributed heterogeneous applications.
[0050] S1, the step of obtaining coordinates, obtains the coordinates of the element to be clicked in the interface of the software to be tested. There are many ways to obtain the coordinates of the element to be clicked. This embodiment can be obtained in the following ways: 1. Call the element positioning function of the Appium client to obtain the coordinates, for example, obtain one or more of the element's id, text, class name, unique attributes, etc., use Robot Framework to call the Get Element Location method of AppiumLibrary, obtain the location of the element, obtain the coordinates of the clicked element based on the positioning and extract the x and y coordinate values. 2. Manual input, manually obtain the area on the screen corresponding to the element, manually select a sub-area or pixel in the area, locate the coordinates of the element, and input the coordinates. In other embodiments, coordinates can also be obtained by other methods, which are not specifically limited here.
[0051] S2, the step of obtaining the identification, obtains the conversation identification of the current conversation in the Appium client; specifically: Use Robot Framework to call the Get Appium SessionId method of AppiumLibrary to obtain the conversation identification of the current conversation in the Appium client. The conversation identification (SessionId) is the SessionID, which is stored in the server memory and the client's Cookie. When the user makes a request, the server compares the user's SessionID with the SessionID in the server memory to find the corresponding Session of this user for operation. In this embodiment, the SessionID can be used to determine whether the request comes from the same conversation. Get Appium SessionId is a direct call of the existing interface, and its working principle is not elaborated in detail here. Through the Get Appium SessionId interface, the conversation identification (SessionID) of the current conversation can be directly obtained and provided to the next step.
[0052] Through steps S1-S2, the coordinates of the element to be clicked and the conversation identifier of the current conversation in the Appium client have been obtained. The coordinates and conversation identifier are provided to the next step for further processing.
[0053] S3, http request construction step, calls the PostRequest method of RequestsLibrary through Robot Framework to construct an http request with the coordinates and the conversation identifier, the address of the http request contains the conversation identifier, and the request body of the http request contains the coordinates. After the http request is sent to the Appium server, the Appium server parses the corresponding instructions according to the definition of the http protocol and sends them to the terminal.
[0054] In this embodiment, the address of the http request is the communication address port of the Appium server, specifically Appium server address port + / wd / hub / session / ${dialogue identifier} / touch / perform, where ${dialogue identifier} is the dialogue identifier obtained in step S2, the request header of the http request is Content-Type=application / json; charset=UTF-8, and the request body of the http request is {"actions":[{"action":"tap","options":{"x": ${x},"y": ${y}}}]}, where ${x} and ${y} are the coordinates obtained in step S1, respectively, x corresponds to the horizontal coordinate, y corresponds to the vertical coordinate, and "action":"tap" indicates that the required operation is clicking.
[0055] At this point, the constructed http request contains the session identifier and coordinates.
[0056] S4, a continuous click instruction sending step, continuously sending the http request to the Appium server to realize continuous clicking of the element to be clicked.
[0057] The steps of sending the continuous click instruction are specifically as follows:
[0058] S4.1, Create automated test scripts using Robot Framework.
[0059] Robot Framework is an extensible test automation framework. Testers can use python to encapsulate keywords and use automated test scripts to call keywords in a non-code environment to build executable test cases. The automated test script contains at least the following information: the address of the Appium client, the path of the software to be tested, the command is click, the number of clicks, etc. To create an automated test script, use the Open Application method of the AppiumLibrary library of Robot Framework. The method parameters of this method include the address of the Appium client and the path of the software to be tested. After the method is executed, the software to be tested will be in an open state.
[0060] S4.2, the automated test script controls the Appium client to connect to the software under test. The method of connecting the Appium client to the software under test is a prior art and will not be elaborated in detail here.
[0061] S4.3, the automated test script continuously sends the http request to the Appium server, and the Appium server parses the http request to obtain the corresponding instruction, and the Appium server sends the instruction to the terminal, thereby realizing continuous clicking of the element to be clicked. The automated test script sends an http request to the Appium server, and the request body of the http request contains the relevant content of the instruction to be executed, and then the Appium server parses the http request, parses the click instruction and the click coordinates in the http request, and obtains the corresponding instruction. Finally, the Appium server sends the instruction to the terminal, controls the terminal to realize the function of clicking once and sends a response after completing the instruction, and then completes a click. Repeat this step to realize the function of continuous clicking. In order to realize continuous clicking of elements, it is only necessary to directly call the constructed http request through the automated test script, and send the http request continuously and multiple times. The entire continuous clicking process only needs to construct an http request once, and it can be called multiple times to achieve the technical effect of multiple continuous clicks. Continuously and multiple times sending the http request can be realized by, for example, a for loop. The method of the present invention directly sends the http request continuously after constructing the http request, which saves the time-consuming processing of the existing method through the Robot Framework for each call.
[0062] Among them, the dialog identifier that comes with the automated test script when issuing an operation request is a unique identifier, representing the device that is opened. The Appium client will retrieve the dialog according to this dialog identifier. In the continuous click operation behavior, the configuration information stored in the Session object will not be lost, but will always exist throughout the entire dialog. The connection between the Appium client and the software under test will not be disconnected during the entire test process, and there is no need to send a request with configuration information every time.
[0063] A continuous click system for APP interface elements is further provided, based on an Appium client, wherein the Appium client is communicatively connected to a terminal on which a software to be tested is installed, wherein the software to be tested includes elements to be clicked, and the system includes the following modules:
[0064] The connection module is used to establish the current session in the Appium client and connect to the terminal where the software to be tested is installed;
[0065] The coordinate acquisition module is used to obtain the coordinates of the elements to be clicked in the interface of the software to be tested;
[0066] Get the identification module, which is used to get the conversation identification of the current conversation in the Appium client;
[0067] An http request building module, used for building an http request with the coordinates and the conversation identifier;
[0068] The continuous click instruction sending module is used to continuously send the http request to the Appium server to realize continuous clicking of the element to be clicked.
[0069] Furthermore, the continuous click instruction sending module includes:
[0070] Script creation submodule for creating automated test scripts using Robot Framework.
[0071] The connection submodule is used for automated test scripts to control the Appium client to connect to the software under test.
[0072] The sending request submodule is used to continuously send the http request to the Appium server through the automated test script, parse the http request by the Appium server to obtain the corresponding instruction, and the Appium server sends the instruction to the terminal, thereby realizing continuous clicking of the element to be clicked.
[0073] Experimental data
[0074] The method provided by the present invention is actually operated with the traditional method, and the operating environment of the method provided by the present invention is the same as that of the traditional method.
[0075] The present invention creates an http request containing a conversation identifier and coordinates, sends the http request to the Appium server five times in a row through an automatic test script, and sends five consecutive click instructions to the terminal through the Appium server. Figure 3 , we can see that the corresponding element on the software under test was clicked five times in a row. Looking at the Robot Framework automated test script execution log, we can see that the terminal can correctly identify the key parameters contained in the http request, such as the number of clicks, port, session identifier, coordinates, etc. The first click took 133 milliseconds, the second click took 140 milliseconds, the third click took 131 milliseconds, the fourth click took 134 milliseconds, and the fifth click took 133 milliseconds. The average time was 134.2 milliseconds, and the maximum fluctuation was 5.8 milliseconds.
[0076] The traditional method uses Robot Framework to create an automated test script. In the automated test script, an existing method is used to connect to the software under test. Then, the ClickElement method of the AppiumLibrary in Robot Framework is continuously called 5 times to click on the element to be clicked in the software under test, and this automated test script is run. Since the traditional method calls the Click Element method, and the Click Element method processes and constructs an HTTP request in Robot Framework and then sends the request, the traditional method needs to construct 5 HTTP requests, which consumes a lot of time and generates fluctuations. Refer to Figure 1 , the time taken for the first click is 203 milliseconds, the second click is 3715 milliseconds, the third click is 3160 milliseconds, the fourth click is 3168 milliseconds, and the fifth click is 3166 milliseconds. The average time taken is 2682.4 milliseconds, and the maximum fluctuation is 3512 milliseconds. It can be seen that starting from the second click, the time taken by the traditional method increases sharply and the fluctuation is unstable.
[0077] Through the above experimental comparison, the present invention realizes an efficient continuous click method, and the interval time of continuous clicks is stable within 200 milliseconds, solving the problem that the native function cannot meet the requirement of efficient continuous clicks.
[0078] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0079] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0080] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0081] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0082] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claim. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0083] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0084] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
[0085] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0086] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0087] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0088] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms should not be understood as necessarily being directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0089] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.
Claims
1. A method for continuously clicking on APP interface elements. Features: The following steps are involved: Establish the current session in the Appium client and connect to the terminal where the software to be tested is installed; Get the coordinates of the element to be clicked in the interface of the software to be tested; Get the conversation ID of the current conversation in the Appium client; Constructing an http request with the coordinates and the session identifier; The http request is continuously sent to the Appium server to realize continuous clicking of the element to be clicked.
2. A method for continuously clicking APP interface elements according to claim 1, Features: After connecting to the terminal where the software to be tested is installed, execute: An opening instruction is sent to the terminal through the current dialogue to open the software to be tested.
3. A method for continuously clicking APP interface elements according to claim 1, Features: Get the conversation ID of the current conversation in the Appium client. The specific steps include: Use Robot Framework to call the Get Appium SessionId method of AppiumLibrary to obtain the conversation identifier of the current conversation in the Appium client.
4. The method for continuously clicking on an APP interface element according to claim 1, Features: The http request is constructed by calling the Post Request method of RequestsLibrary through RobotFramework.
5. A method for continuously clicking APP interface elements according to claim 4, Features: The address of the http request includes the conversation identifier, and the request body of the http request includes the coordinates.
6. A method for continuously clicking APP interface elements according to claim 1, Features: Continuously sending the http request to the Appium server to realize continuous clicking of the element to be clicked, the specific steps include: Create automated test scripts using Robot Framework; The automated test script continuously sends the http request to the Appium server, and the Appium server parses the http request to obtain corresponding instructions. The Appium server sends the instructions to the terminal, thereby realizing continuous clicking of the element to be clicked.
7. A method for continuously clicking APP interface elements according to claim 1, Features: In the step of obtaining the coordinates of the element to be clicked in the interface of the software to be tested, the coordinates are obtained by calling an element positioning function of the Appium client.
8. A continuous click system for APP interface elements. Features: Based on the Appium client, the Appium client is connected to the terminal where the software to be tested is installed, and the software to be tested includes an element to be clicked. The system includes the following modules: The connection module is used to establish the current session in the Appium client and connect to the terminal where the software to be tested is installed; A coordinate acquisition module for acquiring the coordinates of elements to be clicked on the interface of the software to be tested; An identification acquisition module for acquiring the conversation identification of the current conversation in the Appium client; An HTTP request construction module for constructing an HTTP request with the coordinates and the conversation identification; A continuous click instruction sending module for continuously sending the HTTP request to the Appium server to continuously click on the element to be clicked.
9. A continuous click system for APP interface elements according to claim 8, characterized in that: The continuous click instruction sending module includes: A script creation sub-module for creating an automated test script using Robot Framework; A connection sub-module for controlling the Appium client to connect to the software to be tested by the automated test script; A request sending sub-module for continuously sending the HTTP request to the Appium server through the automated test script, parsing the HTTP request by the Appium server to obtain corresponding instructions, and the Appium server sending the instructions to the terminal, thereby realizing continuous clicking on the element to be clicked.
10. A computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, it implements the continuous click method for APP interface elements according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method, device and equipment for realizing web driver json protocol UI automation
CN111857702A
UI test method, electronic equipment and storage medium
CN113326183A