Page control positioning method, device and storage medium
By filtering the candidate control set in the directed graph of the application page architecture and performing step-by-step matching, the problem of difficult positioning of page controls in the directed graph is solved, and the accuracy and robustness of control positioning in complex business scenarios are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DOUYIN VISION CO LTD
- Filing Date
- 2023-09-05
- Publication Date
- 2026-06-16
AI Technical Summary
In applications with complex business scenarios, page controls are difficult to uniquely locate in the directed graph of the application's page architecture, making it impossible for automated testing to quickly and accurately obtain the test path.
By obtaining the control information of the control to be matched in the application, the candidate control set is filtered in the directed graph using the first attribute information, and the matching process is dynamically adjusted through the hierarchical matching of the parent control and/or the child control to improve the accuracy and robustness of control positioning.
In situations with complex and diverse control hierarchy information, it improves the accuracy and adaptability of control matching, enabling it to quickly find target candidate controls and ensure the accuracy of the test path.
Smart Images

Figure CN117171397B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer and network communication technology, and in particular to a method, device and storage medium for locating page controls. Background Technology
[0002] Applications (APPs) that support massive numbers of users and various complex business scenarios are facing rapid user growth and product upgrades and iterations, making their functional stability and issues increasingly important.
[0003] Automated testing, as a primary means of discovering application problems, typically determines test paths based on a directed graph (APP map) of the application's page architecture. However, it often faces the problem that page controls are difficult to uniquely locate within the directed graph (APP map) of the application's page architecture. Summary of the Invention
[0004] This disclosure provides a method, device, and storage medium for locating page controls, thereby improving the accuracy of page control positioning.
[0005] In a first aspect, embodiments of this disclosure provide a method for locating page controls, including:
[0006] Obtain control information of the control to be matched in the application, wherein the control information includes first attribute information;
[0007] Obtain a first set of candidate controls that match the first attribute information of the control to be matched from the directed graph of the application page architecture, wherein the directed graph uses different pages of the application as nodes and the control operations that trigger the jump between pages and the control information as edges connecting the nodes.
[0008] For the control to be matched and any candidate control in the first candidate control set, the upper-level and / or lower-level controls are matched step by step according to their respective control information, so as to find the target candidate control that matches the control to be matched from the first candidate control set.
[0009] Secondly, embodiments of this disclosure provide a page control positioning device, including:
[0010] The control information acquisition unit is used to acquire control information of the control to be matched in the application, wherein the control information includes first attribute information;
[0011] The candidate control acquisition unit is used to acquire a first set of candidate controls that match the first attribute information of the control to be matched from a directed graph of the application page architecture, wherein the directed graph uses different pages of the application as nodes and control operations that trigger page jumps and control information as edges connecting the nodes.
[0012] The matching unit is used to perform hierarchical mutual matching between the control to be matched and any candidate control in the first candidate control set, based on their respective control information, so as to find the target candidate control that matches the control to be matched from the first candidate control set.
[0013] Thirdly, embodiments of this disclosure provide an electronic device, including: at least one processor and a memory;
[0014] The memory stores computer-executed instructions;
[0015] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the page control positioning method as described in the first aspect and various possible designs of the first aspect.
[0016] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the page control positioning method described in the first aspect and various possible designs of the first aspect.
[0017] Fifthly, embodiments of this disclosure provide a computer program product, including computer execution instructions, which, when executed by a processor, implement the page control positioning method described in the first aspect and various possible designs of the first aspect.
[0018] The page control positioning method, device, and storage medium provided in this disclosure involve obtaining control information of a control to be matched in an application, wherein the control information includes first attribute information; obtaining a first set of candidate controls that match the first attribute information of the control to be matched from a directed graph of the application's page architecture, wherein the directed graph uses different pages of the application as nodes, and control operations that trigger page jumps and control information as edges connecting nodes; for the control to be matched and any candidate control in the first set of candidate controls, performing hierarchical mutual matching of upper-level controls and / or lower-level controls according to their respective control information, in order to find a target candidate control that matches the control to be matched from the first set of candidate controls. This disclosure first filters out a first set of candidate controls in the directed graph of the application's page architecture based on the first attribute information of the control to be matched to narrow down the matching range, and then improves the robustness and accuracy of control matching when the control hierarchy information is complex and diverse by dynamically matching upper-level controls and / or lower-level controls layer by layer. Furthermore, the application of the first attribute information and multi-dimensional information of upper-level controls and / or lower-level controls during the matching process enhances adaptability to missing and dynamically changing control information. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A scenario example diagram illustrating a page control positioning method provided in an embodiment of this disclosure;
[0021] Figure 2 This is a schematic flowchart of a page control positioning method provided in an embodiment of the present disclosure;
[0022] Figure 3 This is a schematic flowchart of a page control positioning method provided in another embodiment of the present disclosure;
[0023] Figure 4 This is a structural block diagram of a page control positioning device provided in an embodiment of the present disclosure;
[0024] Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0026] Automated testing, as a primary means of discovering application problems, typically determines test paths based on a directed graph of the application's page architecture (APP map). However, it often faces the challenge of uniquely locating page controls within this graph. The main reasons for this problem include:
[0027] 1) The parent-child hierarchy of page controls is complex and diverse; In applications with complex business scenarios (such as platform-level complex business scenarios), there are often a large number of complex page scenarios, and there are various operable interactive behaviors hidden between each page scenario. Therefore, the directed graph (APP map) of the application page architecture generated by the abstraction of manual test and automated operation data stores a large number of page nodes, and there are complex directed edges (control operations) between nodes, so there are exponential potential test paths.
[0028] 2) Key information about page controls is missing; for example, control identifier (ID) information is missing, control operation type information is missing, etc.
[0029] 3) Page control information is dynamic, variable, and uncertain; for example, control information changes as the application version is upgraded.
[0030] Therefore, it is difficult to uniquely locate any control in the directed graph (APP map) of the application page architecture, making it impossible to quickly and accurately obtain the test path (from the starting scenario to the specified end scenario) for that control, and thus impossible to filter out valuable test paths that meet the testing requirements.
[0031] To address the aforementioned technical problems, this disclosure provides a method for locating page controls. The method involves obtaining control information of the control to be matched in an application, including first attribute information; obtaining a first set of candidate controls matching the first attribute information of the control to be matched from a directed graph of the application's page architecture, wherein the directed graph uses different pages of the application as nodes, and control operations that trigger page transitions and control information as edges connecting nodes; for the control to be matched and any candidate control in the first set of candidate controls, a hierarchical mutual matching of superior and / or subordinate controls is performed based on their respective control information to find a target candidate control matching the control to be matched from the first set of candidate controls. This embodiment first filters out a first set of candidate controls in the directed graph of the application's page architecture based on the first attribute information of the control to be matched to narrow down the matching range. Then, through dynamic hierarchical matching of superior and / or subordinate controls, the robustness and accuracy of control matching can be improved when control hierarchy information is complex and diverse. Furthermore, the application of first attribute information and multi-dimensional information of superior and / or subordinate controls during the matching process enhances adaptability to missing and dynamically changing control information.
[0032] The page control positioning method disclosed herein can be applied to electronic devices such as terminal devices or servers, such as... Figure 1As shown, the electronic device can obtain control information of the control to be matched in the application, wherein the control information includes first attribute information; obtain a first set of candidate controls that match the first attribute information of the control to be matched from the directed graph of the application page architecture; for the control to be matched and any candidate control in the first set of candidate controls, perform hierarchical mutual matching of the parent control and / or the child control according to their respective control information, so as to find the target candidate control that matches the control to be matched from the first set of candidate controls.
[0033] Furthermore, if multiple candidate controls still exist that match the control to be matched after matching the parent and / or child controls, multi-dimensional control information matching can be performed, including but not limited to one or more of the control information such as control class information, control text information, and control index information, in order to determine the target candidate control.
[0034] The page control positioning method of this disclosure will be described in detail below with reference to specific embodiments.
[0035] refer to Figure 2 , Figure 2 This is a schematic flowchart illustrating a page control positioning method according to an embodiment of the present disclosure. The method of this embodiment can be applied to electronic devices such as terminal devices or servers. The page control positioning method includes:
[0036] S201. Obtain the control information of the control to be matched in the application, wherein the control information includes first attribute information.
[0037] In this embodiment, the control to be matched can be a single control on any page of the application, multiple controls on any page, or multiple controls on different pages. In this embodiment, control information of the control to be matched can be obtained from the application. This control information may include, but is not limited to: control identifier (ID), control operation type information, parent control (parent control, grandparent control, etc.), and child control (child control, grandchild control), etc. The control identifier (ID) and / or control operation type information can be recorded as the first attribute information; other information can also be used as the first attribute information.
[0038] Optionally, when retrieving control information for the control to be matched in the application, the tree structure information (JSON format) of the page containing the control to be matched is parsed to obtain the control information of the control to be matched. If the control to be matched is all controls on any page of the application, the page tree structure information can be parsed to obtain the control information of all controls on that page, resulting in a set of control information for all controls on that page. This set can also be obtained based on the first attribute information.
[0039] S202. Obtain a first set of candidate controls that match the first attribute information of the control to be matched from the directed graph of the application page architecture, wherein the directed graph uses different pages of the application as nodes and the control operations that trigger the jump between pages and the control information as edges connecting the nodes.
[0040] In this embodiment, a directed graph (APP map) of the application page architecture is used to represent the page hierarchy. Different pages of the application are used as nodes in the directed graph, and the nodes are connected by directed edges. The directed edge connecting any two nodes is identified by the control operation that triggers the jump between the two pages and the control information. The directed graph of the application page architecture is often used in automated testing or problem interception scenarios. Based on the directed graph of the application page architecture, a set of test paths (the path from the starting page to the ending page) that meets the testing requirements can be determined.
[0041] To locate the control to be matched in the directed graph of the application page architecture, this disclosure first performs matching based on the first attribute information of the control to be matched in the directed graph of the application page architecture to find candidate controls that match the first attribute information of the control to be matched. Since the first attribute information of each control in the directed graph of the application page architecture may not be unique or may be missing, there are multiple candidate controls, which can constitute a first candidate control set. The first attribute information is control identification information (ID) and / or control operation type information, which can greatly reduce the number of candidate controls in the first candidate control set.
[0042] If the first attribute information includes control identification information (ID), then a candidate control with the same identification information (ID) as the control to be matched is searched in the directed graph of the application page architecture. If the first attribute information includes control operation type information, then a candidate control with the same control operation type information as the control to be matched is searched in the directed graph of the application page architecture. If the first attribute information includes both identification information (ID) and control operation type information, then a candidate control with both identification information (ID) and control operation type information as the control to be matched is searched in the directed graph of the application page architecture.
[0043] It should be noted that if one of the first attribute information of each control in the directed graph of the control to be matched and the application page architecture is missing, another first attribute information can be used for matching.
[0044] S203. For the control to be matched and any candidate control in the first candidate control set, perform hierarchical mutual matching of the upper-level control and / or lower-level control according to their respective control information, so as to find the target candidate control that matches the control to be matched from the first candidate control set.
[0045] In this embodiment, considering that if the control to be matched can be matched with a certain candidate control, then the hierarchical relationship between their parent and / or child controls should be completely consistent, after obtaining the first set of candidate controls, control matching can be performed based on the hierarchical relationship between the parent and / or child controls in order to find a target candidate control that uniquely matches the control to be matched from the first set of candidate controls (of course, it is also possible that no match can be found). This includes matching each other step by step based solely on the parent control, or matching each other step by step based solely on the child control, or matching each other step by step based on both the parent and child controls.
[0046] The step-by-step matching process involves matching parent and / or child controls from the fewest to the most levels. The fewer the levels, the faster the matching speed. If a candidate control that uniquely matches the control to be matched can be found when the number of levels is low, the matching is complete, and there is no need to continue matching at more levels. If no candidate control that matches the control to be matched is found when the number of levels is low, the matching fails, and there is no need to continue matching at more levels. If multiple candidate controls that match the control to be matched are found when the number of levels is low, i.e., a unique match cannot be found, the number of levels is increased, and the matching is performed again from these multiple candidate controls. The above process is repeated until a candidate control that uniquely matches the control to be matched is found, or the matching fails, or the matching of all parent nodes and / or all child controls of the control to be matched is completed.
[0047] If a target candidate control that matches the control to be matched is eventually found, since the position of the target candidate control in the directed graph of the application page architecture is known, the position of the control to be matched in the directed graph of the application page architecture can also be determined. Therefore, the test path of the control to be matched can be determined based on the directed graph.
[0048] It should be noted that since the above page control positioning method is performed dynamically, when the control information changes, the controls to be matched and each control in the directed graph of the application page architecture will be updated in real time. Therefore, the above page control positioning method can be executed based on the updated control information to ensure the accuracy of control positioning.
[0049] The page control positioning method provided in this embodiment obtains control information of the control to be matched in the application, wherein the control information includes first attribute information; obtains a first candidate control set that matches the first attribute information of the control to be matched from a directed graph of the application page architecture, wherein the directed graph uses different pages of the application as nodes, and controls that trigger page jumps and control information as edges connecting nodes; for the control to be matched and any candidate control in the first candidate control set, performs hierarchical mutual matching of parent and / or child controls according to their respective control information, so as to find the target candidate control that matches the control to be matched from the first candidate control set. This embodiment first filters out the first candidate control set in the directed graph of the application page architecture based on the first attribute information of the control to be matched to narrow the matching range, and then improves the robustness and accuracy of control matching when the control hierarchy information is complex and diverse by dynamically matching parent and / or child controls layer by layer. In addition, the first attribute information and multi-dimensional information of parent and / or child controls are applied in the matching process to improve the adaptability to missing and dynamic changes in control information.
[0050] Based on any of the above embodiments, step S203, which describes matching the control to be matched with any candidate control in the first candidate control set according to their respective control information, may specifically include:
[0051] Extract the parent control and / or child control of the first target level from the control information of the control to be matched and the control information of any candidate control in the first candidate control set, and perform mutual matching;
[0052] If the parent and / or child controls of the first target level of the control to be matched can match the parent and / or child controls of the first target level of multiple candidate controls in the first candidate control set, then these multiple candidate controls are used as a second candidate control set. The parent and / or child controls of the second target level are extracted from the control information of the control to be matched and the control information of any candidate control in the second candidate control set, and mutual matching is performed again, wherein the second target level is greater than the first target level; or
[0053] If the parent control and / or child control of the first target level of the control to be matched can uniquely match the parent control and / or child control of the first target level of a candidate control in the first candidate control set, then that candidate control is determined as the target candidate control; or
[0054] If the parent control and / or child control of the first target level of the control to be matched cannot match the parent control and / or child control of the first target level of any candidate control in the first candidate control set, then the matching is determined to be a failure.
[0055] The hierarchical matching process between the parent control and / or the child control includes any of the following:
[0056] The target candidate control is determined; or
[0057] The match failed; or
[0058] Complete the matching of all parent nodes and / or all child nodes of the control to be matched with the parent and / or child controls of the same level as the candidate control.
[0059] In one optional embodiment, for the control to be matched and any candidate control in the first candidate control set, a hierarchical matching of parent controls can be performed based on their respective control information. Specifically, for example... Figure 3 As shown, the parent control of the first target level can be extracted (trimmed) from the control information of the control to be matched and the control information of any candidate control in the first candidate control set. For example, the first-level parent control, i.e. the parent control, can be extracted. The control to be matched and its parent control and each candidate control and its respective parent control in the first candidate control set are used as the information to be matched and matched.
[0060] If the control to be matched and its parent control can be uniquely matched with a certain candidate control and its parent control in the first candidate control set, it means that the control to be matched and the candidate control are the same control, and the candidate control is determined as the target candidate control for matching the control to be matched.
[0061] If the control to be matched and its parent control cannot match any candidate control and its parent control in the first candidate control set, it means that there is no control to be matched in the directed graph of the application page architecture, that is, the matching fails.
[0062] If the control to be matched and its parent control can match multiple candidate controls and their respective parent controls in the first candidate control set, then these multiple candidate controls are used as the second candidate control set. From the control information of the control to be matched and the control information of any candidate control in the second candidate control set, the parent control of the second target level (the second target level is greater than the first target level) is extracted (trimmed). For example, two levels of parent controls are extracted, namely the parent control and the grandparent control. The control to be matched and its parent control and grandparent control are matched with each candidate control and its respective parent control and grandparent control in the second candidate control set as the information to be matched.
[0063] If the control to be matched, its parent control, and its grandparent control can uniquely match a certain candidate control, its parent control, and its grandparent control in the second candidate control set, it means that the control to be matched and the candidate control are the same control, and the candidate control is determined as the target candidate control for matching the control to be matched.
[0064] If the control to be matched and its parent and grandparent controls cannot match any of the candidate controls and their parent and grandparent controls in the second set of candidate controls, it means that there is no control to be matched in the directed graph of the application page architecture, that is, the match fails.
[0065] If the control to be matched, its parent control, and its grandparent control can match multiple candidate controls and their respective parent controls and grandparent controls in the second candidate control set, then repeat the above process to continue matching parent controls, grandparent controls, and great-grandparent controls.
[0066] The termination condition for the above-mentioned step-by-step mutual matching process (loop process) includes any of the following:
[0067] The target candidate control was determined;
[0068] Matching failed;
[0069] Complete the matching of all parent controls of the control to be matched with the parent controls of the candidate control at the same level, that is, trace back to the root control of the control to be matched.
[0070] In another optional embodiment, for the control to be matched and any candidate control in the first candidate control set, the lower-level controls can be matched step by step according to their respective control information. Specifically, the lower-level controls of the first target level can be extracted from the control information of the control to be matched and the control information of any candidate control in the first candidate control set, for example, the first-level lower-level control, i.e., the sub-control, and the control to be matched and its sub-controls and each candidate control and its respective sub-controls in the first candidate control set are used as the information to be matched and matched.
[0071] If the control to be matched and its child controls can be uniquely matched with a certain candidate control and its child controls in the first candidate control set, it means that the control to be matched and the candidate control are the same control, and the candidate control is determined as the target candidate control for matching the control to be matched.
[0072] If the control to be matched and its child controls cannot match any of the candidate controls and their child controls in the first set of candidate controls, it means that there is no control to be matched in the directed graph of the application page architecture, that is, the matching fails.
[0073] If the control to be matched and its child controls can match multiple candidate controls and their respective child and parent controls in the first candidate control set, then these multiple candidate controls are used as the second candidate control set. The lower-level controls of the second target level (the second target level is greater than the first target level) are extracted from the control information of the control to be matched and the control information of any candidate control in the second candidate control set. For example, two levels of lower-level controls are extracted, namely child controls and grandchild controls. The control to be matched and its child controls and grandchild controls are matched with each candidate control and its respective child controls and grandchild controls in the second candidate control set as the information to be matched.
[0074] If the control to be matched and its child and grandchild controls can be uniquely matched with a certain candidate control and its child and grandchild controls in the second candidate control set, it means that the control to be matched and the candidate control are the same control, and the candidate control is determined as the target candidate control for matching the control to be matched;
[0075] If the control to be matched and its child and grandchild controls cannot match any of the candidate controls and their child and grandchild controls in the second candidate control set, it means that there is no control to be matched in the directed graph of the application page architecture, that is, the matching fails.
[0076] If the control to be matched and its child and grandchild controls can be matched with multiple candidate controls and their respective child and grandchild controls in the second candidate control set, then repeat the above process to continue matching child, grandchild and great-grandchild controls.
[0077] The termination condition for the above-mentioned step-by-step mutual matching process (loop process) includes any of the following:
[0078] The target candidate control was determined;
[0079] Matching failed;
[0080] Complete the matching of all child controls of the control to be matched with the child controls of the candidate control at the same level, that is, trace back to the leaf control of the control to be matched.
[0081] In another optional embodiment, for the control to be matched and any candidate control in the first candidate control set, the upper-level control and the lower-level control can be matched step by step according to their respective control information. Specifically, the upper-level control and the lower-level control of the first target level can be extracted from the control information of the control to be matched and the control information of any candidate control in the first candidate control set, for example, extracting the first-level upper-level control and the first-level lower-level control, that is, the parent control and the child control. The control to be matched and its parent control and child control are matched with each candidate control in the first candidate control set and its respective parent control and child control as the information to be matched.
[0082] If the control to be matched, its parent control, and its child control can uniquely match a certain candidate control, its parent control, and its child control in the first candidate control set, it means that the control to be matched and the candidate control are the same control, and the candidate control is determined as the target candidate control for matching the control to be matched.
[0083] If the control to be matched and its parent and child controls cannot match any of the candidate controls and their parent and child controls in the first candidate control set, it means that there is no control to be matched in the directed graph of the application page architecture, that is, the matching fails.
[0084] If the control to be matched, its parent control, and its child control can match multiple candidate controls and their respective parent controls and child controls in the first candidate control set, then these multiple candidate controls are used as the second candidate control set. From the control information of the control to be matched and the control information of any candidate control in the second candidate control set, the parent control and child control of the second target level (the second target level is greater than the first target level) are extracted respectively. For example, two levels of parent controls and two levels of child controls are extracted, that is, parent control, grandparent control, child control, and grandchild control. The control to be matched, its parent control, grandparent control, child control, and grandchild control are used as the information to be matched with each candidate control and its respective parent control, grandparent control, child control, and grandchild control in the second candidate control set.
[0085] If the control to be matched and its parent control, grandparent control, child control and grandchild control can uniquely match a certain candidate control and its parent control, grandparent control, child control and grandchild control in the second candidate control set, it means that the control to be matched and the candidate control are the same control, and the candidate control is determined as the target candidate control for matching the control to be matched;
[0086] If the control to be matched and its parent, grandparent, child, and grandchild controls cannot match any of the candidate controls and their parent, grandparent, child, and grandchild controls in the second candidate control set, it means that there is no control to be matched in the directed graph of the application page architecture, that is, the match fails.
[0087] If the control to be matched and its parent control, grandparent control, child control and grandchild control can match multiple candidate controls and their respective parent controls, grandparent controls, child controls and grandchild controls in the second candidate control set, then repeat the above process to continue matching parent controls, grandparent controls, great-grandparent controls, child controls, grandchild controls and great-grandchild controls.
[0088] The termination condition for the above-mentioned step-by-step mutual matching process (loop process) includes any of the following:
[0089] The target candidate control was determined;
[0090] Matching failed;
[0091] Complete the matching of all parent and child controls of the control to be matched with the parent and child controls of the candidate control at the same level, that is, trace back to the root and leaf controls of the control to be matched.
[0092] In another alternative embodiment, the matching can begin from the parent control and proceed level by level. When all parent controls of the control to be matched are matched with the parent controls of the candidate control at the same level, if there are still multiple candidate controls that match the control to be matched, the matching continues from the lower control. The matching process and termination conditions are similar to those in the above embodiment and will not be repeated here.
[0093] In another alternative embodiment, the matching can be performed step by step from the lower-level controls. When all the lower-level controls of the control to be matched are matched with the lower-level controls of the candidate control at the same level, if there are still multiple candidate controls that match the control to be matched, the matching can continue step by step from the upper-level controls. The matching process and termination conditions are similar to those in the above embodiment, and will not be repeated here.
[0094] Based on the above embodiments, if all the parent nodes and / or all the child controls of the control to be matched can still be matched with the parent controls and / or child controls of the same level of the multiple candidate controls, then the multiple candidate controls are regarded as the third candidate control set.
[0095] Furthermore, the second attribute information of the control to be matched is matched with the second attribute information of any candidate control in the third candidate control set, so as to find the target candidate control that matches the control to be matched from the third candidate control set.
[0096] In this embodiment, the second attribute information may include, but is not limited to, one or more of the following: control class information, control text information, and control index information. The confidence level is lower than that of the first attribute information, but it can be used as a condition for further matching between the control to be matched and the third candidate control set. That is, if the control to be matched can be matched with a candidate control in the third candidate control set, then the second attribute information of the two should be completely consistent.
[0097] Specifically, if the second attribute information of the control to be matched uniquely matches the second attribute information of a candidate control in the third candidate control set, then it means that the control to be matched can uniquely match that candidate control, and that candidate control is determined as the target candidate control; or
[0098] If the second attribute information of the control to be matched cannot match the second attribute information of any candidate control in the third candidate control set, it means that the control to be matched cannot match any candidate control, and the matching fails; or
[0099] If the second attribute information of the control to be matched matches the second attribute information of multiple candidate controls in the third candidate control set, then it is considered that there are multiple control correspondences in the directed graph of the application page architecture. The specific reasons for this may include different A / B experiments performed on the current device, different login account types (e.g., member accounts and non-member accounts), different device permission states (e.g., permissioned and permissionless states), etc., leading to different results when performing the same operation on the same control to be matched, resulting in multiple different nodes (corresponding to different edges) in the directed graph of the application page architecture. In this case, these multiple candidate controls are determined as the target candidate control, and the specific further processing logic is defined by the downstream task.
[0100] Optionally, if the second attribute information includes multiple items, such as control class information, control text information, and control index information, then the control to be matched can be matched with any candidate control in the third candidate control set according to the confidence level of the multiple second attribute information (where the confidence level from high to low is control class information > control text information > control index information).
[0101] During the matching process of a certain second attribute information, if the second attribute information of the control to be matched uniquely matches the second attribute information of a candidate control in the third candidate control set, then that candidate control is determined as the target candidate control; or
[0102] When the last item of second attribute information is matched, if the second attribute information of the control to be matched can still match the second attribute information of multiple candidate controls in the third candidate control set, then the multiple candidate controls are determined as the target candidate control.
[0103] Specifically, the process begins by matching the control class information, that is, matching the control class information of the control to be matched with the control class information of each candidate control in the third candidate control set. If the control class information of the control to be matched can uniquely match the control class information of a candidate control in the third candidate control set, then that candidate control is determined as the target candidate control, and the matching ends (no need to perform matching of other second attribute information). If the control class information of the control to be matched cannot match the control class information of any candidate control in the third candidate control set, then the matching fails, and the matching ends. If the control class information of the control to be matched can match the control class information of multiple candidate controls in the third candidate control set, then these multiple candidate controls are used as the fourth candidate control set.
[0104] Then, the control text information is matched, that is, the control text information of the control to be matched is matched with the control text information of each candidate control in the fourth candidate control set. If the control text information of the control to be matched can uniquely match the control text information of a candidate control in the fourth candidate control set, then the candidate control is determined as the target candidate control and the matching ends (no need to match other second attribute information); if the control text information of the control to be matched cannot match the control text information of any candidate control in the fourth candidate control set, then the matching fails and the matching ends; if the control text information of the control to be matched can match the control text information of multiple candidate controls in the fourth candidate control set, then these multiple candidate controls are used as the fifth candidate control set.
[0105] Finally, the control index information is matched, that is, the control index information of the control to be matched is matched with the control index information of each candidate control in the fifth candidate control set. If the control index information of the control to be matched can uniquely match the control index information of a candidate control in the fifth candidate control set, then the candidate control is determined as the target candidate control and the matching ends; if the control index information of the control to be matched cannot match the control index information of any candidate control in the fifth candidate control set, then the matching fails and the matching ends; if the control index information of the control to be matched can match the control index information of multiple candidate controls in the fifth candidate control set, then these multiple candidate controls are output as the target candidate control.
[0106] It should be noted that if one of the second attribute information of the control to be matched and the candidate control is missing, the matching can continue using other second attribute information.
[0107] In the above embodiments, the matching process uses multi-dimensional information of the control (control class information, control text information, control index information), which improves the accuracy of control positioning and enhances adaptability to missing or dynamically changing control information.
[0108] Corresponding to the page control positioning method in the above embodiment, Figure 4 This is a structural block diagram of a page control positioning device provided in an embodiment of this disclosure. For ease of explanation, only the parts relevant to the embodiments of this disclosure are shown. (Refer to...) Figure 4 The page control positioning device 400 includes: a control information acquisition unit 401, a candidate control acquisition unit 402, and a matching unit 403.
[0109] The control information acquisition unit 401 is used to acquire control information of the control to be matched in the application, wherein the control information includes first attribute information.
[0110] The candidate control acquisition unit 402 is used to acquire a first set of candidate controls that match the first attribute information of the control to be matched from the directed graph of the application page architecture, wherein the directed graph uses different pages of the application as nodes and control operations that trigger the jump between pages and control information as edges connecting the nodes.
[0111] The matching unit 403 is used to perform hierarchical mutual matching of the control to be matched with any candidate control in the first candidate control set according to their respective control information, so as to find the target candidate control that matches the control to be matched from the first candidate control set.
[0112] In one or more embodiments of this disclosure, when the matching unit 403 performs hierarchical matching of the control to be matched with any candidate control in the first candidate control set based on their respective control information, it is used to:
[0113] Extract the parent control and / or child control of the first target level from the control information of the control to be matched and the control information of any candidate control in the first candidate control set, and perform mutual matching;
[0114] If the parent control and / or child control of the first target level of the control to be matched can match the parent control and / or child control of the first target level of multiple candidate controls in the first candidate control set, then the multiple candidate controls are used as the second candidate control set. The parent control and / or child control of the second target level are extracted from the control information of the control to be matched and the control information of any candidate control in the second candidate control set, and the matching is performed again, wherein the second target level is greater than the first target level.
[0115] In one or more embodiments of this disclosure, the matching unit 403 is further configured to:
[0116] If the parent control and / or child control of the first target level of the control to be matched can uniquely match the parent control and / or child control of the first target level of a candidate control in the first candidate control set, then that candidate control is determined as the target candidate control; or
[0117] If the parent control and / or child control of the first target level of the control to be matched cannot match the parent control and / or child control of the first target level of any candidate control in the first candidate control set, then the matching is determined to be a failure.
[0118] In one or more embodiments of this disclosure, the termination condition for the hierarchical matching process of the parent control and / or the child control includes any one of the following:
[0119] The target candidate control is determined; or
[0120] The match failed; or
[0121] Complete the matching of all parent nodes and / or all child nodes of the control to be matched with the parent and / or child controls of the same level as the candidate control.
[0122] In one or more embodiments of this disclosure, the first attribute information includes: control identification information and / or control operation type information.
[0123] In one or more embodiments of this disclosure, the matching unit 403 is further configured to:
[0124] If all parent nodes and / or all child nodes of the control to be matched can still be matched with parent and / or child controls of the same level as multiple candidate controls, then the multiple candidate controls are regarded as the third set of candidate controls.
[0125] The second attribute information of the control to be matched is matched with the second attribute information of any candidate control in the third candidate control set, so as to find the target candidate control that matches the control to be matched from the third candidate control set.
[0126] In one or more embodiments of this disclosure, when the matching unit 403 matches the second attribute information of the control to be matched with the second attribute information of any candidate control in the third candidate control set to find a target candidate control that matches the control to be matched from the third candidate control set, it is configured to:
[0127] If the second attribute information of the control to be matched uniquely matches the second attribute information of a candidate control in the third candidate control set, then that candidate control is determined as the target candidate control; or
[0128] If the second attribute information of the control to be matched cannot match the second attribute information of any candidate control in the third candidate control set, then the matching is determined to have failed; or
[0129] If the second attribute information of the control to be matched matches the second attribute information of multiple candidate controls in the third candidate control set, then the multiple candidate controls are determined as the target candidate control.
[0130] In one or more embodiments of this disclosure, the second attribute information includes one or more of the following: control class information, control text information, and control index information.
[0131] In one or more embodiments of this disclosure, if the second attribute information includes multiple items, then when the matching unit 403 matches the second attribute information of the control to be matched with the second attribute information of any candidate control in the third candidate control set, it is used to:
[0132] Based on the confidence level of multiple second attribute information, the control to be matched is matched with any candidate control in the third candidate control set for each of the second attribute information in turn.
[0133] During the matching process of a certain second attribute information, if the second attribute information of the control to be matched uniquely matches the second attribute information of a candidate control in the third candidate control set, then that candidate control is determined as the target candidate control; or
[0134] When the last item of second attribute information is matched, if the second attribute information of the control to be matched can still match the second attribute information of multiple candidate controls in the third candidate control set, then the multiple candidate controls are determined as the target candidate control.
[0135] In one or more embodiments of this disclosure, the control information acquisition unit 401, when acquiring control information of a control to be matched in an application, is used to:
[0136] The page tree structure information of the control to be matched is parsed to obtain the control information of the control to be matched.
[0137] In one or more embodiments of this disclosure, after the matching unit 403 searches for a target candidate control that matches the control to be matched from the first candidate control set, it is further configured to:
[0138] The test path of the target candidate control is determined in the directed graph, and the test path of the target candidate control is used as the test path of the control to be matched.
[0139] The device provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0140] refer to Figure 5 The diagram illustrates a structural schematic of an electronic device 500 suitable for implementing embodiments of the present disclosure. The electronic device 500 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0141] like Figure 5 As shown, the electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0142] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0143] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.
[0144] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0145] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0146] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
[0147] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0148] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0149] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0150] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0151] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0152] In a first aspect, according to one or more embodiments of this disclosure, a method for locating page controls is provided, comprising:
[0153] Obtain control information of the control to be matched in the application, wherein the control information includes first attribute information;
[0154] Obtain a first set of candidate controls that match the first attribute information of the control to be matched from the directed graph of the application page architecture, wherein the directed graph uses different pages of the application as nodes and the control operations that trigger the jump between pages and the control information as edges connecting the nodes.
[0155] For the control to be matched and any candidate control in the first candidate control set, the upper-level and / or lower-level controls are matched step by step according to their respective control information, so as to find the target candidate control that matches the control to be matched from the first candidate control set.
[0156] According to one or more embodiments of this disclosure, the step of performing stepwise mutual matching of the control to be matched with any candidate control in the first candidate control set based on their respective control information, including:
[0157] Extract the parent control and / or child control of the first target level from the control information of the control to be matched and the control information of any candidate control in the first candidate control set, and perform mutual matching;
[0158] If the parent control and / or child control of the first target level of the control to be matched can match the parent control and / or child control of the first target level of multiple candidate controls in the first candidate control set, then the multiple candidate controls are used as the second candidate control set. The parent control and / or child control of the second target level are extracted from the control information of the control to be matched and the control information of any candidate control in the second candidate control set, and the matching is performed again, wherein the second target level is greater than the first target level.
[0159] According to one or more embodiments of this disclosure, the method further includes:
[0160] If the parent control and / or child control of the first target level of the control to be matched can uniquely match the parent control and / or child control of the first target level of a candidate control in the first candidate control set, then that candidate control is determined as the target candidate control; or
[0161] If the parent control and / or child control of the first target level of the control to be matched cannot match the parent control and / or child control of the first target level of any candidate control in the first candidate control set, then the matching is determined to be a failure.
[0162] According to one or more embodiments of this disclosure, the termination condition for the hierarchical matching process of the parent control and / or the child control includes any one of the following:
[0163] The target candidate control is determined; or
[0164] The match failed; or
[0165] Complete the matching of all parent nodes and / or all child nodes of the control to be matched with the parent and / or child controls of the same level as the candidate control.
[0166] According to one or more embodiments of this disclosure, the first attribute information includes: control identification information and / or control operation type information.
[0167] According to one or more embodiments of this disclosure, the method further includes:
[0168] If all parent nodes and / or all child nodes of the control to be matched can still be matched with parent and / or child controls of the same level as multiple candidate controls, then the multiple candidate controls are regarded as the third set of candidate controls.
[0169] The second attribute information of the control to be matched is matched with the second attribute information of any candidate control in the third candidate control set, so as to find the target candidate control that matches the control to be matched from the third candidate control set.
[0170] According to one or more embodiments of this disclosure, the step of matching the second attribute information of the control to be matched with the second attribute information of any candidate control in the third candidate control set, in order to find a target candidate control that matches the control to be matched from the third candidate control set, includes:
[0171] If the second attribute information of the control to be matched uniquely matches the second attribute information of a candidate control in the third candidate control set, then that candidate control is determined as the target candidate control; or
[0172] If the second attribute information of the control to be matched cannot match the second attribute information of any candidate control in the third candidate control set, then the matching is determined to have failed; or
[0173] If the second attribute information of the control to be matched matches the second attribute information of multiple candidate controls in the third candidate control set, then the multiple candidate controls are determined as the target candidate control.
[0174] According to one or more embodiments of this disclosure, the second attribute information includes one or more of the following: control class information, control text information, and control index information.
[0175] According to one or more embodiments of this disclosure, if the second attribute information includes multiple items, then matching the second attribute information of the control to be matched with the second attribute information of any candidate control in the third candidate control set includes:
[0176] Based on the confidence level of multiple second attribute information, the control to be matched is matched with any candidate control in the third candidate control set for each of the second attribute information in turn.
[0177] During the matching process of a certain second attribute information, if the second attribute information of the control to be matched uniquely matches the second attribute information of a candidate control in the third candidate control set, then that candidate control is determined as the target candidate control; or
[0178] When the last item of second attribute information is matched, if the second attribute information of the control to be matched can still match the second attribute information of multiple candidate controls in the third candidate control set, then the multiple candidate controls are determined as the target candidate control.
[0179] According to one or more embodiments of this disclosure, obtaining the control information of the control to be matched in the application includes:
[0180] The page tree structure information of the control to be matched is parsed to obtain the control information of the control to be matched.
[0181] According to one or more embodiments of this disclosure, after searching for a target candidate control that matches the control to be matched from the first candidate control set, the method further includes:
[0182] The test path of the target candidate control is determined in the directed graph, and the test path of the target candidate control is used as the test path of the control to be matched.
[0183] Secondly, according to one or more embodiments of this disclosure, a page control positioning device is provided, comprising:
[0184] The control information acquisition unit is used to acquire control information of the control to be matched in the application, wherein the control information includes first attribute information;
[0185] The candidate control acquisition unit is used to acquire a first set of candidate controls that match the first attribute information of the control to be matched from a directed graph of the application page architecture, wherein the directed graph uses different pages of the application as nodes and control operations that trigger page jumps and control information as edges connecting the nodes.
[0186] The matching unit is used to perform hierarchical mutual matching between the control to be matched and any candidate control in the first candidate control set, based on their respective control information, so as to find the target candidate control that matches the control to be matched from the first candidate control set.
[0187] According to one or more embodiments of this disclosure, when the matching unit performs hierarchical matching of the control to be matched with any candidate control in the first candidate control set based on their respective control information, it is configured to:
[0188] Extract the parent control and / or child control of the first target level from the control information of the control to be matched and the control information of any candidate control in the first candidate control set, and perform mutual matching;
[0189] If the parent control and / or child control of the first target level of the control to be matched can match the parent control and / or child control of the first target level of multiple candidate controls in the first candidate control set, then the multiple candidate controls are used as the second candidate control set. The parent control and / or child control of the second target level are extracted from the control information of the control to be matched and the control information of any candidate control in the second candidate control set, and the matching is performed again, wherein the second target level is greater than the first target level.
[0190] According to one or more embodiments of this disclosure, the matching unit is further configured to:
[0191] If the parent control and / or child control of the first target level of the control to be matched can uniquely match the parent control and / or child control of the first target level of a candidate control in the first candidate control set, then that candidate control is determined as the target candidate control; or
[0192] If the parent control and / or child control of the first target level of the control to be matched cannot match the parent control and / or child control of the first target level of any candidate control in the first candidate control set, then the matching is determined to be a failure.
[0193] According to one or more embodiments of this disclosure, the termination condition for the hierarchical matching process of the parent control and / or the child control includes any one of the following:
[0194] The target candidate control is determined; or
[0195] The match failed; or
[0196] Complete the matching of all parent nodes and / or all child nodes of the control to be matched with the parent and / or child controls of the same level as the candidate control.
[0197] According to one or more embodiments of this disclosure, the first attribute information includes: control identification information and / or control operation type information.
[0198] According to one or more embodiments of this disclosure, the matching unit is further configured to:
[0199] If all parent nodes and / or all child nodes of the control to be matched can still be matched with parent and / or child controls of the same level as multiple candidate controls, then the multiple candidate controls are regarded as the third set of candidate controls.
[0200] The second attribute information of the control to be matched is matched with the second attribute information of any candidate control in the third candidate control set, so as to find the target candidate control that matches the control to be matched from the third candidate control set.
[0201] According to one or more embodiments of this disclosure, when the matching unit matches the second attribute information of the control to be matched with the second attribute information of any candidate control in the third candidate control set to find a target candidate control that matches the control to be matched from the third candidate control set, it is configured to:
[0202] If the second attribute information of the control to be matched uniquely matches the second attribute information of a candidate control in the third candidate control set, then that candidate control is determined as the target candidate control; or
[0203] If the second attribute information of the control to be matched cannot match the second attribute information of any candidate control in the third candidate control set, then the matching is determined to have failed; or
[0204] If the second attribute information of the control to be matched matches the second attribute information of multiple candidate controls in the third candidate control set, then the multiple candidate controls are determined as the target candidate control.
[0205] According to one or more embodiments of this disclosure, the second attribute information includes one or more of the following: control class information, control text information, and control index information.
[0206] According to one or more embodiments of this disclosure, if the second attribute information includes multiple items, then when the matching unit matches the second attribute information of the control to be matched with the second attribute information of any candidate control in the third candidate control set, it is used to:
[0207] Based on the confidence level of multiple second attribute information, the control to be matched is matched with any candidate control in the third candidate control set for each of the second attribute information in turn.
[0208] During the matching process of a certain second attribute information, if the second attribute information of the control to be matched uniquely matches the second attribute information of a candidate control in the third candidate control set, then that candidate control is determined as the target candidate control; or
[0209] When the last item of second attribute information is matched, if the second attribute information of the control to be matched can still match the second attribute information of multiple candidate controls in the third candidate control set, then the multiple candidate controls are determined as the target candidate control.
[0210] According to one or more embodiments of this disclosure, when the control information acquisition unit acquires control information of a control to be matched in an application, it is used to:
[0211] The page tree structure information of the control to be matched is parsed to obtain the control information of the control to be matched.
[0212] According to one or more embodiments of this disclosure, after the matching unit searches for a target candidate control that matches the control to be matched from the first candidate control set, it is further configured to:
[0213] The test path of the target candidate control is determined in the directed graph, and the test path of the target candidate control is used as the test path of the control to be matched.
[0214] Thirdly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;
[0215] The memory stores computer-executed instructions;
[0216] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the page control positioning method as described in the first aspect and various possible designs of the first aspect.
[0217] Fourthly, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, and when a processor executes the computer-executable instructions, the page control positioning method described in the first aspect and various possible designs of the first aspect is implemented.
[0218] Fifthly, according to one or more embodiments of this disclosure, a computer program product is provided, including computer execution instructions that, when executed by a processor, implement the page control positioning method described in the first aspect and various possible designs of the first aspect.
[0219] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0220] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0221] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for locating page controls, characterized in that, include: Obtain control information of the control to be matched in the application, wherein the control information includes first attribute information; Obtain a first set of candidate controls that match the first attribute information of the control to be matched from the directed graph of the application page architecture, wherein the directed graph uses different pages of the application as nodes and the control operations that trigger the jump between pages and the control information as edges connecting the nodes. For the control to be matched and any candidate control in the first candidate control set, the upper-level and / or lower-level controls are matched step by step according to their respective control information, so as to find the target candidate control that matches the control to be matched from the first candidate control set; The method further includes: If all parent nodes and / or all child nodes of the control to be matched can still be matched with parent and / or child controls of the same level as multiple candidate controls, then the multiple candidate controls are regarded as the third set of candidate controls. The second attribute information of the control to be matched is matched with the second attribute information of any candidate control in the third candidate control set, so as to find the target candidate control that matches the control to be matched from the third candidate control set.
2. The method according to claim 1, characterized in that, The step of performing a step-by-step matching of the control to be matched with any candidate control in the first candidate control set, based on their respective control information, includes: Extract the parent control and / or child control of the first target level from the control information of the control to be matched and the control information of any candidate control in the first candidate control set, and perform mutual matching; If the parent control and / or child control of the first target level of the control to be matched can match the parent control and / or child control of the first target level of multiple candidate controls in the first candidate control set, then the multiple candidate controls are used as the second candidate control set. The parent control and / or child control of the second target level are extracted from the control information of the control to be matched and the control information of any candidate control in the second candidate control set, and the matching is performed again, wherein the second target level is greater than the first target level.
3. The method according to claim 2, characterized in that, The method further includes: If the parent control and / or child control of the first target level of the control to be matched can uniquely match the parent control and / or child control of the first target level of a candidate control in the first candidate control set, then that candidate control is determined as the target candidate control; or If the parent control and / or child control of the first target level of the control to be matched cannot match the parent control and / or child control of the first target level of any candidate control in the first candidate control set, then the matching is determined to be a failure.
4. The method according to claim 2 or 3, characterized in that, The termination condition for the hierarchical matching process between the parent and / or child controls includes any of the following: The target candidate control is determined; or Matching failed; or Complete the matching of all parent nodes and / or all child nodes of the control to be matched with the parent and / or child controls of the same level as the candidate control.
5. The method according to claim 1, characterized in that, The first attribute information includes: control identification information and / or control operation type information.
6. The method according to claim 1, characterized in that, The step of matching the second attribute information of the control to be matched with the second attribute information of any candidate control in the third candidate control set to find a target candidate control that matches the control to be matched from the third candidate control set includes: If the second attribute information of the control to be matched uniquely matches the second attribute information of a candidate control in the third candidate control set, then that candidate control is determined as the target candidate control; or If the second attribute information of the control to be matched cannot match the second attribute information of any candidate control in the third candidate control set, then the matching is determined to have failed; or If the second attribute information of the control to be matched matches the second attribute information of multiple candidate controls in the third candidate control set, then the multiple candidate controls are determined as the target candidate control.
7. The method according to claim 6, characterized in that, The second attribute information includes one or more of the following: control class information, control text information, and control index information.
8. The method according to claim 6, characterized in that, If the second attribute information includes multiple items, then matching the second attribute information of the control to be matched with the second attribute information of any candidate control in the third candidate control set includes: Based on the confidence level of multiple second attribute information, the control to be matched is matched with any candidate control in the third candidate control set for each of the second attribute information in turn. During the matching process of a certain second attribute information, if the second attribute information of the control to be matched uniquely matches the second attribute information of a candidate control in the third candidate control set, then that candidate control is determined as the target candidate control; or When the last item of second attribute information is matched, if the second attribute information of the control to be matched can still match the second attribute information of multiple candidate controls in the third candidate control set, then the multiple candidate controls are determined as the target candidate control.
9. The method according to claim 1, characterized in that, The step of obtaining the control information of the control to be matched in the application includes: The page tree structure information of the control to be matched is parsed to obtain the control information of the control to be matched.
10. The method according to claim 1, characterized in that, After finding the target candidate control that matches the control to be matched from the first candidate control set, the method further includes: The test path of the target candidate control is determined in the directed graph, and the test path of the target candidate control is used as the test path of the control to be matched.
11. A page control positioning device, characterized in that, include: The control information acquisition unit is used to acquire control information of the control to be matched in the application, wherein the control information includes first attribute information; The candidate control acquisition unit is used to acquire a first set of candidate controls that match the first attribute information of the control to be matched from a directed graph of the application page architecture, wherein the directed graph uses different pages of the application as nodes and control operations that trigger page jumps and control information as edges connecting the nodes. The matching unit is used to perform hierarchical mutual matching of the control to be matched with any candidate control in the first candidate control set according to their respective control information, so as to find the target candidate control that matches the control to be matched from the first candidate control set. The matching unit is further configured to: If all parent nodes and / or all child nodes of the control to be matched can still be matched with parent and / or child controls of the same level as multiple candidate controls, then the multiple candidate controls are regarded as the third set of candidate controls. The second attribute information of the control to be matched is matched with the second attribute information of any candidate control in the third candidate control set, so as to find the target candidate control that matches the control to be matched from the third candidate control set.
12. An electronic device, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the method as described in any one of claims 1-11.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the method as described in any one of claims 1-10.
14. A computer program product, characterized in that, Includes computer execution instructions, which, when executed by a processor, implement the method as described in any one of claims 1-10.