Automatic testing method and system based on Canvas element dynamic positioning
By distinguishing Canvas canvas types and using corresponding positioning methods and simulated click technology, the problem of target elements positioning on Canvas canvas is solved, efficient and accurate automated testing is achieved, and manual intervention is reduced.
Patent Information
- Application Number
- CN202510327132.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-07-04
AI Technical Summary
The existing automated testing framework cannot accurately locate target elements on the Canvas canvas, especially in the presence of overlapping elements and different resolutions, which makes the test quality difficult to guarantee and relies on manual testing to consume a lot of time.
By distinguishing whether the Canvas canvas is a topological type, an improved element positioning method is used to locate the topological type, a test assisted search box is added for fuzzy matching query, and a regular prescribed bit method is used for non-topological types, and precise positioning is achieved in combination with simulated click technology.
It improves the positioning efficiency and accuracy of Canvas elements, reduces manual testing workload, reduces testing costs, and ensures the accuracy and efficiency of automated testing.
Smart Images

Figure CN120256300A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of HTML testing, and particularly to an automated testing method and system based on dynamic positioning of Canvas elements. Background Art
[0002] As an important part of HTML5, Canvas has been widely used in web applications and other fields. However, Canvas is a drawing board where elements are stacked on it. Specific elements on it cannot be directly obtained like DOM, and the complexity and dynamics of the rendering process pose great challenges to testing work.
[0003] Currently, common automated testing frameworks often cannot accurately obtain Canvas elements from the drawing board, resulting in the inability to effectively handle the problem of dynamic elements during Canvas rendering, and it is difficult to guarantee the testing quality. There are the following defects:
[0004] (1) The positioning of canvas elements is inaccurate.
[0005] (2) There are situations such as element overlap and different environmental resolutions, making it impossible to locate the target element.
[0006] (3) The script of the automated test cannot find the element and cannot be effectively executed.
[0007] (4) It relies on manual testing, consuming a large amount of time cost. Summary of the Invention
[0008] This application provides an automated testing method and system based on dynamic positioning of Canvas elements, which can solve the technical problem in the prior art that it is difficult to accurately locate the target element in the Canvas drawing board during automated testing.
[0009] In the first aspect, the embodiments of this application provide (independent claim)
[0010] In combination with the first aspect, in one implementation manner, (dependent claim)
[0011] In the second aspect, the embodiments of this application provide a (second independent claim)
[0012] In combination with the second aspect, in one implementation manner, (dependent claim)
[0013] The beneficial effects brought by the technical solutions provided by the embodiments of this application include:
[0014] By differentiating whether the Canvas canvas is of a topological type, an improved element positioning method is adopted for the topological type, focusing on solving the problem of difficult element positioning caused by element overlap and different resolutions, so that the element information of all target elements is displayed on the Canvas canvas. When the element information is clicked, the corresponding target element will be displayed on the Canvas canvas, thus facilitating the tester to find the element. For non-topological types, a conventional element positioning method is adopted to reduce the workload, thereby comprehensively improving the positioning efficiency and accuracy of Canvas elements, further improving the automation test effect, reducing the workload of manual testing, and greatly reducing the test cost. Brief Description of the Drawings
[0015] Figure 1 FIG. is a schematic flowchart of an embodiment of an automated testing method based on dynamic positioning of Canvas elements in the present application;
[0016] Figure 2 FIG. is a schematic flowchart of a specific embodiment of an automated testing method based on dynamic positioning of Canvas elements when the Canvas canvas is of a topological type;
[0017] Figure 3 FIG. is a schematic flowchart of an embodiment of an automated testing method based on dynamic positioning of Canvas elements when the Canvas canvas is of a non-topological type;
[0018] Figure 4 FIG. is a schematic flowchart of another specific embodiment of an automated testing method based on dynamic positioning of Canvas elements when the Canvas canvas is of a non-topological type;
[0019] Figure 5 FIG. is a schematic diagram of functional modules of an embodiment of an automated testing system based on dynamic positioning of Canvas elements in the present application. Detailed Embodiments
[0020] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0021] To make the purpose, technical solution and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0022] In a first aspect, an embodiment of the present application provides an automated testing method based on dynamic positioning of Canvas elements.
[0023] In one embodiment, referring to Figure 1 , Figure 1 is a schematic flowchart of an embodiment of an automated testing method based on dynamic positioning of Canvas elements in this application. As Figure 1 shown, the automated testing based on dynamic positioning of Canvas elements includes:
[0024] Step S1: Determine whether the Canvas canvas is of a topological type:
[0025] If yes, go to step S2;
[0026] If no, go to step S3;
[0027] Step S2: Add the code of the test auxiliary search box to the canvas code of the Canvas canvas. When performing automated testing, input query data into the test auxiliary search box, query the original information of all elements in the Canvas canvas according to the query data to filter out the target element and its element information, display the element information on the Canvas canvas, and after detecting a click on the element information, display the corresponding target element on the Canvas canvas, and then go to step S4;
[0028] Step S3: Obtain the element sizes of each target element in the Canvas canvas and their positions relative to the viewport, click and display each target element by means of simulated clicking, and then go to step S4;
[0029] Step S4: Perform automated testing based on the target elements displayed on the Canvas canvas.
[0030] In this embodiment, since Canvas is a layer of canvas, elements cannot be directly obtained like DOM. For a traditional automated testing framework, when positioning elements on a topological type (topo type) Canvas canvas, even if the longitude and latitude information of the elements is known, it is difficult to directly locate the elements based on the longitude and latitude information. For example, if there are overlapping elements, it is very difficult for testers to separately select multiple overlapping elements with the same longitude and latitude by means of mouse clicking, etc., resulting in difficulty in separately positioning multiple elements with the same longitude and latitude. Another example is that if the resolution of the Canvas canvas is low, even if the longitude and latitude information is known, the Canvas canvas needs to be enlarged to be clear enough, and then testers select the elements by means of mouse clicking, etc., resulting in difficulty in positioning elements even when there is no element overlap. When it is difficult to locate the target elements that need to be automatically tested on the Canvas canvas, the automated testing cannot proceed smoothly.
[0031] In summary, for the elements on the Canvas, one often has to click by finding the longitude and latitude positions or the offset of the mouse position. In cases where there are overlapping elements or different environmental resolutions, it is impossible to accurately locate the target element. Consequently, the problems of Canvas element positioning and obtaining dynamic elements during the rendering process cannot be effectively addressed. This also leads to the inability to execute many subsequent test cases related to Canvas elements, making it difficult to ensure the test quality.
[0032] This patent accurately captures and analyzes the specific positions of Canvas elements in two cases: topo and non-topo, and then simulates the user's click operation to construct an accurate automated test model, which also has the following advantages:
[0033] (1) Achieved accurate positioning of Canvas elements through two methods: topo and non-topo. Thus, automated testing is realized, including multiple aspects such as functional testing, performance testing, and compatibility testing.
[0034] (2) For the Canvas implemented by the topo method, it solves the problem of being unable to accurately locate the target element due to overlapping elements, different resolutions, etc., improving the accuracy and efficiency of testing.
[0035] (3) Through automated testing, the workload of manual testing is reduced, greatly reducing the testing cost.
[0036] Furthermore, in one embodiment, there are overlaps between the elements in the Canvas of the topological type;
[0037] There are no overlaps between the elements in the Canvas of the non-topological type.
[0038] In this embodiment, if there are no overlaps between the elements in the Canvas, generally, through traditional element positioning methods, the target elements for automated testing can be found on the Canvas. Although there is a problem of long time consumption when using traditional element positioning methods at low environmental resolutions, considering that using traditional methods does not require modifying the canvas code and reduces the workload, enabling non-professionals to also locate the target elements. Therefore, for the positioning of non-topological type Canvas elements, traditional element positioning methods are still adopted. It should be noted that, according to actual needs, improved element positioning methods can also be used for the positioning of non-topological type Canvas elements.
[0039] If there are overlaps among elements in the Canvas canvas, an improved element positioning method is adopted. By adding the box code of the test auxiliary search box to the canvas code of the Canvas canvas, when performing automated testing, only need to input query data into the test auxiliary search box, query the original information of all elements in the Canvas canvas according to the query data, then the target element and its element information can be obtained. After displaying the element information on the Canvas canvas, only need to manually or simulate clicking on any element information, and the corresponding target element will be displayed on the Canvas canvas, quickly and accurately realizing element positioning.
[0040] Further, in one embodiment, the above method further includes:
[0041] When it is determined that the Canvas canvas is of the topological type, configure the opening and closing switch of the test auxiliary search box in the static file. After turning on the opening and closing switch, the test auxiliary search box is displayed on the Canvas canvas. After turning off the opening and closing switch, the test auxiliary search box is not displayed on the Canvas canvas.
[0042] In this embodiment, by adding the opening and closing switch, when element positioning is not required, the search box can be closed to avoid displaying the search box on the Canvas canvas and affecting the complete display of the Canvas canvas.
[0043] If the automated test auxiliary switch is configured in the code corresponding to the HTML page, it can also be used to control whether the automated test auxiliary search box is displayed on the Canvas canvas as needed. However, it is equivalent to setting the switch to either on or off in advance. If you want to adjust the switch state, you need to modify the HTML file and publish it again. With the static file, only need to modify this file in the system and then restart the web-related services.
[0044] Further, in one embodiment, the above query data includes element name, element ID, and element type;
[0045] After inputting the query data into the test auxiliary search box, query the original information of all elements in the Canvas canvas in a fuzzy matching manner to filter out the target element and its element information.
[0046] In this embodiment, when inputting the query data, it may not be known exactly the accurate details of the final target element required. Therefore, all possibly relevant target elements can be filtered out in a fuzzy matching manner for further screening to obtain the final desired target element.
[0047] Taking the Canvas canvas as a map as an example, the data to be queried may be node names (such as the specific name of a certain school), node IDs, fiber connection names (such as the route name between two schools), fiber connection IDs, or element types (such as school types), etc.
[0048] The Canvas canvas of the topological type can be any type of graph as long as it takes into account the topological structure. It can be a map or a routing graph, etc. The map can be a Canvas graph of the topological type or a non-topological type Canvas graph.
[0049] Further, in one embodiment, the element information is displayed on the Canvas canvas in tabular form.
[0050] In this embodiment, when the element information of all target elements is displayed on the Canvas canvas in tabular form, the names of the respective target elements can be listed in one column, and the element information of the target elements can be listed in another column. The element information can be the element type, etc. When the element information is clicked, the corresponding target element is displayed on the Canvas canvas, and at the same time, some other information of the target element can also be displayed on the Canvas canvas to facilitate determining whether it is the required target element.
[0051] Further, in one embodiment, the above method further includes:
[0052] While displaying the element information on the Canvas canvas, the target element is displayed on the Canvas canvas. After detecting a click on the element information, a highlight prompt is given to the corresponding target element on the Canvas canvas.
[0053] In this embodiment, if the filtered target elements are obtained, the target elements and the element information can be displayed on the Canvas canvas at the same time, or only the target elements can be displayed on the Canvas canvas. If there are multiple filtered target elements, there are two display methods. One is to only display the element information, and then display the corresponding target elements after clicking the element information. The other is to display the element information and the target elements at the same time, and highlight the corresponding target elements after clicking the element information. The multiple display methods can be switched according to actual needs.
[0054] In a specific embodiment, referring to the appendix Figure 2 , for the Canvas canvas of the topological type, such as a map, the element positioning method includes:
[0055] Introduce an automated test auxiliary search box into the map-related code of the Canvas canvas.
[0056] Open the automated test auxiliary switch configured in the static file to display the automated test auxiliary search box on the Canvas map.
[0057] Input the data to be queried, such as node name, node ID, fiber connection name, fiber connection ID, or element type, etc., into the automated test auxiliary search box, and click the query button.
[0058] The front end sends the input data in the input box to the back end. The back end receives the input from the input box, such as the node name. Then it queries all node object sets A displayed on the page, and performs a fuzzy match on the node name within set A to obtain set B that contains the node name. And it returns set B to the front end.
[0059] After the front end receives set B, it converts the node information (including the node name and some related information) in set B into the input parameter model required by the layerEvent function in GIS (Geographic Information System), namely GisLayerMouseEventModel, and calls the layerEvent function, so as to display all nodes in set B on the Canvas canvas.
[0060] Click on the target node, and based on the node ID, find the corresponding node on the map and highlight it.
[0061] Furthermore, in one embodiment, referring to Figure 3 , when the above Canvas canvas is of non-topological type, it specifically includes the following steps:
[0062] Step S31: Obtain the element instances of each target element according to the original information of all elements in the Canvas canvas;
[0063] Step S32: Obtain the Canvas variables of each target element according to the element instances;
[0064] Step S33: Obtain the 2D rendering context of each target element according to the Canvas variables;
[0065] Step S34: Based on the 2D rendering context, obtain the element size of each target element in the Canvas canvas and its position relative to the viewport, and click and display each target element by simulating a click.
[0066] In this embodiment, copy the Canvas element instance of the Canvas canvas in the HTML page to a variable, such as the Canvas variable. Obtain the 2D rendering context of the Canvas variable. Based on the 2D rendering context, obtain the element size of each target element in the Canvas canvas and its position relative to the viewport, and click and display each target element by simulating a click.
[0067] In a specific embodiment, referring to Figure 4 , for a non-topological type Canvas canvas, such as a map, the element positioning method includes:
[0068] Copy the Canvas element instance of the Canvas canvas in the HTML page to a variable, such as a Canvas variable.
[0069] Obtain the 2D rendering context of the Canvas variable.
[0070] Call the getBoundingCliebtRect() method of the 2D rendering context of the Canvas variable. This method will return a DOMRect object, which contains width, height, top, right, bottom, and left attributes, representing the size of the element and its position relative to the viewport respectively. Thus, the position and size of the Canvas variable relative to the viewport (generally referring to the visible area of the entire browser window) can be obtained.
[0071] In the case where the page also has a scroll bar, it is also necessary to obtain the page scroll offset through window.scrollX (horizontal scroll amount) and window.scrollY (vertical scroll amount).
[0072] The offset clientX of the x coordinate of the upper left corner of the Canvas variable relative to the entire document is left in S2.2.4 + window.scrollX in S2.2.5, and the offset clientY of the y coordinate of the upper left corner of the Canvas variable relative to the entire document is top in S2.2.4 + window.scrollY in S2.2.5. The clientX and clientY attributes of the updated event coordinates of the upper left corner of the Canvas variable are the X and Y coordinates relative to the document.
[0073] Create a new mouse event for subsequent use.
[0074] Obtain all elements above or below the specified coordinate position (clientX, clientY). Traverse these elements and determine whether they are Canvas elements. If so, trigger the previously created mouse event on this element. If not, skip it.
[0075] In Selenium, use ActionChains to simulate complex mouse and keyboard operations, such as mouse movement, click, double-click, drag, keyboard input, etc. To achieve the effect of simulating user clicks.
[0076] In a second aspect, the embodiments of the present application further provide an automated testing system based on dynamic positioning of Canvas elements.
[0077] In one embodiment, referring to Figure 5 , Figure 5 is a schematic diagram of the functional modules of an embodiment of the automated testing system based on dynamic positioning of Canvas elements in the present application. As Figure 5 shown, the automated testing system based on dynamic positioning of Canvas elements includes:
[0078] Element positioning module 1, which is used to determine whether the Canvas canvas is of a topological type. If so, add the box code of the test auxiliary search box to the canvas code of the Canvas canvas. When performing automated testing, input query data into the test auxiliary search box, query the original information of all elements in the Canvas canvas according to the query data, filter to obtain the target element and its element information, display the element information on the Canvas canvas, and after detecting a click on the element information, display the corresponding target element on the Canvas canvas; if not, obtain the element size of each target element in the Canvas canvas and its position relative to the viewport, and click and display each target element by simulating a click;
[0079] Testing module 2, which is used to perform automated testing according to the target elements displayed on the Canvas canvas.
[0080] In this embodiment, by distinguishing whether the Canvas canvas is of a topological type, an improved element positioning method is adopted for the topological type, focusing on solving the problem of difficult element positioning caused by element overlap and different resolutions, so that the element information of all target elements is displayed on the Canvas canvas. When the element information is clicked, the corresponding target element will be displayed on the Canvas canvas, thus facilitating the tester to find the element. For non-topological types, a conventional element positioning method is adopted to reduce the workload, thereby comprehensively improving the positioning efficiency and positioning accuracy of Canvas elements, further improving the automated testing effect, reducing the workload of manual testing, and greatly reducing the testing cost.
[0081] Furthermore, in some embodiments, when the above element positioning module determines that the Canvas canvas is of a topological type, configure the opening and closing switch of the test auxiliary search box in the static file. After the opening and closing switch is turned on, the test auxiliary search box is displayed on the Canvas canvas. After the opening and closing switch is turned off, the test auxiliary search box is not displayed on the Canvas canvas.
[0082] In this embodiment, by adding an opening and closing switch, when element positioning is not required, the search box can be closed to avoid displaying the search box on the Canvas canvas and affecting the complete display of the Canvas canvas.
[0083] If the automated test assistance switch is configured in the code corresponding to the HTML page, it is also possible to control whether to display the automated test assistance search box on the Canvas canvas as needed. However, it is equivalent to setting the switch to either on or off in advance. If you want to adjust the switch status, you need to modify the HTML file again and publish it. For static files, you only need to modify this file in the system and then restart the web-related services.
[0084] Further, in some embodiments, after the above element positioning module inputs query data in the test assistance search box, it queries the original information of all elements in the Canvas canvas by means of fuzzy matching to filter out the target element and its element information.
[0085] In this embodiment, when inputting query data, the accurate details of the final target element may not be known. Therefore, all possibly relevant target elements can be filtered out by means of fuzzy matching so as to be filtered again to obtain the final desired target element.
[0086] Taking the Canvas canvas as a map as an example, the query data may be the node name (such as the specific name of a certain school), node id, fiber connection name (such as the route name between two schools), fiber connection id, or element type (such as school type), etc.
[0087] The Canvas canvas of the topological type can be any type of graph as long as it considers the topological structure. It can be a map or a routing graph, etc. The map can be a Canvas graph of the topological type or a Canvas graph of the non-topological type.
[0088] Among them, the function implementation of each module in the above automated test system based on dynamic positioning of Canvas elements corresponds to each step in the above embodiment of the automated test method based on dynamic positioning of Canvas elements, and its function and implementation process will not be elaborated here one by one.
[0089] It should be noted that the serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0090] In the description of the specification, claims and the above-mentioned drawings of this application, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally further include steps or units not listed, or may optionally further include other steps or units inherent to these processes, methods, products or devices. Descriptions such as "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit that "first", "second" and "third" are different types.
[0091] In the description of the embodiments of this application, terms such as "exemplary", "for example" or "for instance" are used to indicate examples, illustrations or explanations. Any embodiment or design solution described as "exemplary", "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary", "for example" or "for instance" is intended to present related concepts in a specific manner.
[0092] In the description of the embodiments of this application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B; "and / or" in the text is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "a plurality of" means two or more than two.
[0093] In some processes described in the embodiments of this application, a plurality of operations or steps appear in a specific order. However, it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of this application or may be executed in parallel. The serial numbers of the operations are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0094] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a terminal device to execute the methods described in the various embodiments of this application.
[0095] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present application.
Claims
1. An automated testing method based on dynamic positioning of Canvas elements, characterized in that, The method includes: Determine whether the Canvas canvas is of a topological type. If so, add the box code of the test auxiliary search box to the canvas code of the Canvas canvas. When performing automated testing, input query data into the test auxiliary search box, query the original information of all elements in the Canvas canvas according to the query data, filter to obtain the target element and its element information, display the element information on the Canvas canvas, and after detecting a click on the element information, display the corresponding target element on the Canvas canvas; If not, obtain the element sizes of each target element in the Canvas canvas and their positions relative to the viewport, and click and display each target element by simulating a click; Perform automated testing based on the target elements displayed on the Canvas canvas.
2. The automated testing method based on dynamic positioning of Canvas elements according to claim 1, wherein There are overlaps between the elements in the topological type Canvas canvas; There are no overlaps between the elements in the non-topological type Canvas canvas.
3. The automated testing method based on dynamic positioning of Canvas elements according to claim 1, characterized in that, The method further includes: When it is determined that the Canvas canvas is of a topological type, configure the opening and closing switch of the test auxiliary search box in the static file. After turning on the opening and closing switch, the test auxiliary search box is displayed on the Canvas canvas. After turning off the opening and closing switch, the test auxiliary search box is not displayed on the Canvas canvas.
4. The automated testing method based on dynamic positioning of Canvas elements as claimed in claim 1, wherein The query data includes the element name, element ID, and element type; After inputting the query data into the test auxiliary search box, query the original information of all elements in the Canvas canvas by means of fuzzy matching to filter out the target element and its element information.
5. The automated testing method based on dynamic positioning of Canvas elements according to claim 1, characterized in that, Display the element information on the Canvas canvas in tabular form.
6. The automated testing method based on dynamic positioning of Canvas elements according to claim 1, wherein The method further includes: While displaying the element information on the Canvas canvas, display the target element on the Canvas canvas. After detecting a click on the element information, highlight the corresponding target element on the Canvas canvas.
7. The automated testing method based on dynamic positioning of Canvas elements according to claim 1, characterized in that, When the Canvas canvas is of a non-topological type, it specifically includes the following steps: Obtain the element instances of each target element according to the original information of all elements in the Canvas canvas; Obtain the Canvas variables of each target element according to the element instances; Obtain the 2D rendering context of each target element according to the Canvas variables; Based on the 2D rendering context, obtain the element sizes of each target element in the Canvas canvas and their positions relative to the viewport, and click and display each target element by simulating a click.
8. An automated testing system based on dynamic positioning of Canvas elements, characterized in that, The system includes: An element positioning module, which is used to determine whether the Canvas canvas is of a topological type. If so, the box code of the test auxiliary search box is added to the canvas code of the Canvas canvas. When performing automated testing, query data is input into the test auxiliary search box, and the original information of all elements in the Canvas canvas is queried according to the query data to filter out the target element and its element information, and the element information is displayed on the Canvas canvas. After detecting a click on the element information, the corresponding target element is displayed on the Canvas canvas; if not, the element size of each target element in the Canvas canvas and its position relative to the viewport are obtained, and each target element is clicked and displayed by simulating a click. A test module, which is used to perform automated testing based on the target elements displayed on the Canvas canvas.
9. The automated testing system based on dynamic positioning of Canvas elements as claimed in claim 8, wherein, When the element positioning module determines that the Canvas canvas is of a topological type, the opening and closing switch of the test auxiliary search box is configured in the static file. After the opening and closing switch is turned on, the test auxiliary search box is displayed on the Canvas canvas. After the opening and closing switch is turned off, the test auxiliary search box is not displayed on the Canvas canvas.
10. The automated testing system for dynamic positioning based on the Canvas element as claimed in claim 8, wherein, After the element positioning module inputs query data into the test auxiliary search box, it queries the original information of all elements in the Canvas canvas by means of fuzzy matching to filter out the target element and its element information.