Page element problem identification method and device, electronic equipment and storage medium

By obtaining and analyzing the view structure information and layout code information of the Android page, and automatically computing and displaying text information, the problem of Android page being unable to automatically identify problems, realizing automatic problem identification of page elements, and improving testing efficiency.

CN119782164AActive Publication Date: 2025-04-08CHINA AUTOMOTIVE INNOVATION CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411852511.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-04-08
Estimated Expiration
2044-12-16

AI Technical Summary

Technical Problem

The existing technology cannot realize the automated problem identification of Android pages, especially in multilingual applications. When the reference of Android page prototype diagrams is lacking, it requires manual verification.

Method used

By obtaining the view structure information of the page to be identified by the target application, searching the layout code information based on the layout information of the page elements, calculating the current and target display text information, and identifying display text problems, realizing automatic problem identification of page elements.

Benefits of technology

It realizes automated problem identification of Android page elements, reduces the burden of manual inspection, and improves the testing efficiency of multilingual applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782164A_ABST
    Figure CN119782164A_ABST
Patent Text Reader

Abstract

The invention discloses a page element problem identification method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining view structure information of a to-be-identified page of a target application program; the view structure information comprises layout information of each page element in the to-be-identified page; aiming at each page element in the to-be-identified page, based on the layout information of the page element, searching a page layout code file of the to-be-identified page to obtain layout code information, used for defining the layout of the page element, of the page element; and when the layout information contains the display text information, performing calculation based on the layout code information and the layout information, and performing display text problem identification on the current display text information and the target display text information of the page element obtained based on calculation to obtain a problem identification result of the page element. According to the method and the device, the purpose of automatically performing display text problem identification on each page element in the to-be-identified page is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automated testing of mobile devices, and in particular to a method, device, electronic device and storage medium for identifying page element problems. Background Art

[0002] Currently, the problem identification of Android pages is usually matched with the Android page prototype to determine whether there is a problem with the current page. For multilingual applications, manual inspection is still required without the reference of the Android page prototype. Summary of the invention

[0003] In order to solve the problems of the prior art, the embodiments of the present application provide a method, device, electronic device and storage medium for identifying page element problems, so as to at least solve the problem that the prior art cannot automatically identify problems of Android pages. The technical solution is as follows:

[0004] According to a first aspect of an embodiment of the present application, a method for identifying page element problems is provided, the method comprising:

[0005] Acquire view structure information of a page to be identified of a target application; the view structure information includes layout information of each page element in the page to be identified;

[0006] For each page element in the page to be identified, based on the layout information of the page element, searching the page layout code file of the page to be identified to obtain the layout code information of the page element; the layout code information is used to define the layout of the page element;

[0007] When the layout information includes display text information, performing calculation based on the layout code information and the layout information to obtain current display text information and target display text information of the page element;

[0008] Display text problem recognition is performed based on the current display text information of the page element and the target display text information to obtain a text problem recognition result of the page element.

[0009] In an exemplary embodiment, the layout information includes boundary coordinate information of the page element on the page to be identified;

[0010] After obtaining the view structure information of the to-be-identified page of the target application, the method further includes:

[0011] Based on the view structure information, determining a structural level corresponding to each page element in the to-be-identified page;

[0012] For the page to be identified, based on the boundary coordinate information of each page element in the page to be identified, the position overlap problem between the page elements of the same structural level in the page to be identified is identified to obtain the position overlap problem identification result of each page element in the page to be identified.

[0013] In an exemplary embodiment, when the to-be-identified page includes a plurality of different to-be-identified pages in the target application, the method further includes:

[0014] The target problem identification results in the problem identification result set are deduplicated to obtain deduplicated problem identification results; the target problem identification results represent multiple identical problem identification results of the same page element in the multiple different pages to be identified; the problem identification result set includes position overlapping problem identification results and text problem identification results.

[0015] In an exemplary embodiment, the method further comprises:

[0016] Obtaining screenshots of the multiple different pages to be identified;

[0017] After obtaining the problem identification result after deduplication, the method further includes:

[0018] The deduplicated problem identification results are marked on the screenshots of the multiple different pages to be identified, and the positions of the deduplicated problem identification results and the positions of the page elements corresponding to the deduplicated problem identification results on the screenshots of the multiple different pages to be identified are marked in one-to-one correspondence.

[0019] In an exemplary implementation, searching the page layout code file based on the layout information to obtain the layout code information of the page element includes:

[0020] When the layout information includes target information, searching the page layout code file based on the target information to obtain the layout code information of the page element;

[0021] When the layout information does not contain target information, a search is performed based on the view structure text generated based on the view structure information of the page to be identified to obtain the layout information of the target page element; the layout information of the target page element includes the target identifier of the target page element; based on the target identifier, the view structure text is searched to obtain the layout code information corresponding to the target identifier, and the layout code information corresponding to the target identifier is determined as the layout code information of the target page element; based on the position and relative position information of the layout code information of the target page element in the view structure text, the page layout code file is searched to obtain the layout code information of the page element; the relative position information represents the relative position of the layout information of the target page element and the layout information of the page element in the view structure text.

[0022] In an exemplary implementation, the target information includes display text information; searching the page layout code file based on the target information to obtain the layout code information of the page element includes:

[0023] When the target information includes the identifier of the page element, based on the identifier, searching the page layout code file to obtain layout code information corresponding to the identifier, and determining the layout code information corresponding to the identifier as the layout code information of the page element;

[0024] When the target information does not contain the identifier, the page layout code file is searched based on the display text information to obtain layout code information containing the display text information, and the layout code information containing the display text information is determined as the layout code information of the page element.

[0025] In an exemplary embodiment, the method further comprises:

[0026] Using an automated testing framework, executing clicks on the target application;

[0027] Obtaining view structure information of a page before clicking and view structure information of a page after clicking in the target application;

[0028] Performing a similarity comparison based on the view structure information of the page before the click and the view structure information of the page after the click;

[0029] Determining whether the result of the similarity comparison is less than a first preset similarity threshold;

[0030] If so, determine that the post-click page is the page to be identified.

[0031] According to a second aspect of an embodiment of the present application, a device for identifying page element problems is provided, the device comprising:

[0032] A view structure information acquisition module, used to acquire view structure information of a page to be identified of a target application; the view structure information includes layout information of each page element in the page to be identified;

[0033] A layout code information search module is used to search the page layout code file of the page to be identified for each page element in the page to be identified based on the layout information of the page element to obtain the layout code information of the page element; the layout code information is used to define the layout of the page element;

[0034] a calculation module, configured to, when the layout information includes display text information, perform calculation based on the layout code information and the layout information to obtain current display text information and target display text information of the page element;

[0035] The text problem identification module is used to identify the display text problem based on the current display text information of the page element and the target display text information to obtain the text problem identification result of the page element.

[0036] In an exemplary embodiment, the layout information includes boundary coordinate information of the page element on the page to be identified; the device further includes:

[0037] A structural level determination module, used to determine the structural level corresponding to each page element in the to-be-identified page based on the view structure information;

[0038] A position overlap problem identification module is used to identify position overlap problems between page elements of the same structural level in the page to be identified based on the boundary coordinate information of each page element in the page to be identified, and obtain a position overlap problem identification result for each page element in the page to be identified.

[0039] In an exemplary embodiment, when the to-be-identified page includes a plurality of different to-be-identified pages in the target application, the apparatus further includes:

[0040] A deduplication module is used to deduplicate the target problem identification results in the problem identification result set to obtain deduplicated problem identification results; the target problem identification results represent multiple identical problem identification results of the same page element in the multiple different pages to be identified; the problem identification result set includes position overlapping problem identification results and text problem identification results.

[0041] In an exemplary embodiment, the apparatus further comprises:

[0042] A screenshot acquisition module, used to acquire screenshots of the plurality of different pages to be identified;

[0043] A marking module is used to mark the problem identification results after deduplication on the screenshots of the multiple different pages to be identified, and mark the positions of the problem identification results after deduplication and the positions of the page elements corresponding to the problem identification results after deduplication on the screenshots of the multiple different pages to be identified in a one-to-one correspondence.

[0044] In an exemplary embodiment, the module for searching layout code information includes:

[0045] A first search module, configured to search the page layout code file based on the target information to obtain the layout code information of the page element when the layout information includes the target information;

[0046] A second search module is used to search the view structure text generated based on the view structure information of the page to be identified to obtain the layout information of the target page element when the layout information does not contain the target information; the layout information of the target page element includes the target identifier of the target page element; based on the target identifier, the view structure text is searched to obtain the layout code information corresponding to the target identifier, and the layout code information corresponding to the target identifier is determined as the layout code information of the target page element; based on the position and relative position information of the layout code information of the target page element in the view structure text, the page layout code file is searched to obtain the layout code information of the page element; the relative position information represents the relative position of the layout information of the target page element and the layout information of the page element in the view structure text.

[0047] In an exemplary embodiment, the first search module includes:

[0048] an identification search module, for searching a page layout code file based on the identification when the target information includes the identification of the page element, obtaining layout code information corresponding to the identification, and determining the layout code information corresponding to the identification as the layout code information of the page element;

[0049] The display text information search module searches for the page layout code file based on the display text information when the target information does not contain the identifier, obtains the layout code information containing the display text information, and determines the layout code information containing the display text information as the layout code information of the page element.

[0050] In an exemplary embodiment, the apparatus further comprises:

[0051] An automated testing framework for executing clicks on the target application;

[0052] A module for obtaining click view structure information is used to obtain view structure information of a page before clicking and view structure information of a page after clicking in the target application;

[0053] A similarity comparison module, used for performing a similarity comparison based on the view structure information of the page before the click and the view structure information of the page after the click;

[0054] A similarity determination module, used to determine whether the result of the similarity comparison is less than a first preset similarity threshold;

[0055] The module for determining a page to be identified is used to determine that the post-click page is the page to be identified when the result of the similarity comparison is less than a first preset similarity threshold.

[0056] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the page element problem identification method of any of the above aspects.

[0057] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement a page element problem identification method as described in any of the above aspects.

[0058] According to a fifth aspect of the embodiments of the present disclosure, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the task scheduling detection method of any one of the above aspects.

[0059] The embodiment of the present application obtains the view structure information of the page to be identified of the target application; the view structure information includes the layout information of each page element in the page to be identified; for each page element in the page to be identified, based on the layout information of the page element, the page layout code file of the page to be identified is searched to obtain the layout code information of the page element for defining the layout of the page element; when the layout information includes display text information, calculation is performed based on the layout code information and the layout information to obtain the current display text information and target display text information of the page element; display text problem recognition is performed based on the current display text information and the target display text information to obtain the problem recognition result of the page element, thereby realizing automatic display text problem recognition for each page element in the page to be identified. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0061] Figure 1 It is a flow chart of a method for identifying page element problems provided by an embodiment of the present application;

[0062] Figure 2 It is a schematic diagram of an automatic click flow of a method for identifying page element problems provided by an embodiment of the present application;

[0063] Figure 3 It is a structural block diagram of a device for identifying page element problems provided by an embodiment of the present application;

[0064] Figure 4 It is a hardware structure block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0066] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0067] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0068] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0069] The embodiment of the present application relates to a page element problem identification technology for an application page of an Android system in the field of automated testing of mobile devices. With the increasing complexity of mobile applications, the importance of automated testing in software development has become increasingly prominent. Problem identification for page display, especially the common problems of incomplete text display, incorrect line breaks, text overlap, etc. in multilingual applications, often requires testers or user page designers to check page elements and displayed text one by one. User page problem identification is a cumbersome and laborious process. At present, user page problem identification is usually matched with a user page prototype diagram to determine whether there is a problem with the current page. For multilingual applications, in the absence of a user page prototype diagram reference, manual inspection is still required. Therefore, it is very necessary to develop a method for automated problem identification of Android user pages.

[0070] In order to solve the problem that the prior art cannot automatically identify problems of Android pages, an embodiment of the present application provides a method for identifying problems of page elements. The method obtains view structure information of a page to be identified of a target application, and obtains layout code information of each page element based on the layout information of each page element contained in the view structure information. When the layout information includes display text information, calculation is performed based on the layout code information and the layout information, and display text problem identification is performed based on the current display text information and target display text information of the page element obtained by the calculation, thereby obtaining a text problem identification result of the page element.

[0071] The following is a specific embodiment of a method for identifying page element problems provided by this application. Figure 1 , which shows a flow chart of a method for identifying page element problems provided by an embodiment of the present application. It should be noted that this specification provides method operation steps as described in the embodiment or flow chart, but more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the order of many steps and does not represent the only execution order. When the system or product is executed in practice, it can be executed in sequence or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, a parallel processor or a multi-threaded processing environment). Specifically, the method may include the following steps:

[0072] Step S1: obtaining view structure information of a page to be identified of a target application; the view structure information includes layout information of each page element in the page to be identified.

[0073] Specifically, the page layout displayed in the mobile application usually uses a tree structure layout. The page view structure information obtained by AndroidUIAutomator (Android automatic testing framework) can be regarded as a snapshot of the layout information of each page element in the user page tree structure, and all page element information on the current page is exported to an Extensible Markup Language (XML) file, namely, the page view structure text. The page view structure text includes the view structure information of the layout information of each page element in the current page.

[0074] In some exemplary embodiments, the layout information includes boundary coordinate information of the page element on the page to be identified;

[0075] After obtaining the view structure information of the to-be-identified page of the target application, the method further includes:

[0076] Based on the view structure information, determine the structural level corresponding to each page element in the page to be identified;

[0077] For the page to be identified, the position overlap problem between page elements of the same structural level in the page to be identified is identified based on the boundary coordinate information of each page element in the page to be identified, and the position overlap problem identification result of each page element in the page to be identified is obtained.

[0078] Specifically, the level of the page element is determined through the correspondence between the parent node and the child node of the tree structure layout in the view structure information. Exemplarily, the level of the root node is 0, that is, the page element of level 0. With each deeper level, the level of the page element is increased by 1. The number of levels corresponding to each page element in the current view structure is obtained recursively, thereby determining the level of each page element in the page to be identified. By identifying the position overlap problem between multiple page elements of the same level according to the boundary coordinate information, the position overlap problem identification result of each page element in the page to be identified can be obtained.

[0079] Step S2: for each page element in the page to be identified, based on the layout information of the page element, searching the page layout code file of the page to be identified to obtain the layout code information of the page element; the layout code information is used to define the layout of the page element;

[0080] Specifically, compared with the layout code information of the page element, the layout information of the page element cannot obtain information such as the font size, width / height type, and padding of the page element. The lack of font size makes it impossible to calculate the height and width of the font display, and the lack of the width / height type and padding of the page element makes it impossible to determine whether the text of the page element is incompletely displayed.

[0081] In some exemplary implementations, based on the layout information, searching the page layout code file to obtain the layout code information of the page element includes:

[0082] When the layout information includes target information, the page layout code file is searched based on the target information to obtain the layout code information of the page element;

[0083] When the layout information does not contain the target information, the view structure text generated based on the view structure information of the page to be identified is searched to obtain the layout information of the target page element; the layout information of the target page element includes the target identifier of the target page element; based on the target identifier, the view structure text is searched to obtain the layout code information corresponding to the target identifier, and the layout code information corresponding to the target identifier is determined as the layout code information of the target page element; based on the position and relative position information of the layout code information of the target page element in the view structure text, the page layout code file is searched to obtain the layout code information of the page element; the relative position information represents the relative position of the layout information of the target page element and the layout information of the page element in the view structure text.

[0084] Specifically, when the layout information contains target information, the layout code information of the page element can be obtained by searching the page layout code file according to the target information; when the layout information does not contain target information, the layout information of the target page element containing the target identifier of the target page element is first searched in the view structure text generated by the view structure information of the page to be identified. Since the relative positions of the layout information of the target page element and the layout information of the page element can be determined in the view structure text, the position of the layout code information of the page element in the page layout code file can be determined according to the relative position information and the position of the layout code information of the target page element in the page layout code file, thereby obtaining the layout code information of the page element.

[0085] In some exemplary implementations, the target information includes display text information; based on the target information, searching the page layout code file to obtain the layout code information of the page element includes:

[0086] When the target information includes an identifier of a page element, based on the identifier, the page layout code file is searched to obtain layout code information corresponding to the identifier, and the layout code information corresponding to the identifier is determined as the layout code information of the page element;

[0087] When the target information does not contain an identifier, the page layout code file is searched based on the display text information to obtain layout code information containing the display text information, and the layout code information containing the display text information is determined as the layout code information of the page element.

[0088] Specifically, when the target information contains the identifier of the page element, the layout code information corresponding to the identifier is found in the page layout code file based on the identifier, and the layout code information of the page element can be determined. When the target information does not contain the identifier, the layout code information containing the display text information is found in the page layout code file based on the display text information, and the layout code information of the page element can be determined, thereby obtaining the layout code information of the page element.

[0089] Step S3: when the layout information includes display text information, calculation is performed based on the layout code information and the layout information to obtain the current display text information and the target display text information of the page element;

[0090] Specifically, when the width and height of the page element in the layout code information are fixed sizes, according to the information such as the page element width, page element height, page element left and right margins, page element top and bottom margins in the layout code information, the difference between the page element width and the page element left and right margins is used as the current display text width; the difference between the page element height and the page element top and bottom margins is used as the current display text width; if the page element also contains icons, the current display text width is obtained by subtracting the left and right margins of the page element from the page element width minus the width of the icon, and the current display text height is obtained by subtracting the top and bottom margins of the page element from the page element height minus the height of the icon, where the height and height of the icon can be obtained from the view structure information or from the layout code information.

[0091] Regarding the calculation of the target display text information, the target display text height and width are calculated based on the font language, font text and font attributes, wherein the font language and font text are based on the layout information. It should be noted that the font text information included in the layout information is the complete font text information in the page element and is not affected by problems such as incomplete display. The font attributes are obtained through the layout code information, and the font attributes include information such as font size and whether the font is bold. For example, the height and width of the font display required for text display are calculated by using the Pillow library in python software based on the font language, font text and font attributes.

[0092] Step S4: performing display text problem recognition based on the current display text information and the target display text information of the page element to obtain a text problem recognition result of the page element.

[0093] Specifically, when there is a maximum width limit for the target display text, the font is split. Taking English words as an example, the widths of words and spaces are accumulated in sequence. When the accumulated width exceeds the maximum width, a line break is performed, and the target display text height is the font line height multiplied by the number of lines, where the font line height is obtained based on the height of the font display in the text. Common text display incomplete problems include the following: incomplete display of fixed text height and incomplete display due to adaptive text width and height but display exceeding the boundary. For the case of incomplete display of fixed text height, first obtain the width and height attributes of the page element. If the width and height are fixed, calculate the width and height of the target display text when the width is limited, and determine whether the fixed height of the page element is satisfied. If the fixed height of the page element is less than the target display text height, the text is incompletely displayed. For the case of incomplete display of adaptive text width and height, obtain the layout information of the page element. If the layout information defines the starting left boundary distance of the text, but there is no constraint on the right boundary of the text, the text may be displayed beyond the screen, resulting in incomplete text display. There are several common situations of incorrect line breaks: incorrect line breaks within a word and incorrect line breaks on buttons due to insufficient width of the current text display of the page element; calculating the display width and height of each word in the text. If the width of one of the words exceeds the maximum current text display width limit, incorrect line breaks will occur within the word; calculating the display width and height of the target text. If the target text display width exceeds the current text display width limit of the page element and the page element is a clickable page element, it is an incorrect line break on a button.

[0094] In some exemplary embodiments, when the page to be identified includes multiple different pages to be identified in the target application, the method further includes:

[0095] The target problem recognition results in the problem recognition result set are deduplicated to obtain deduplicated problem recognition results; the target problem recognition results represent multiple identical problem recognition results of the same page element in multiple different pages to be recognized; the problem recognition result set includes position overlapping problem recognition results and text problem recognition results.

[0096] Specifically, due to multiple identical problem identification results for the same page element in multiple different pages to be identified, the multiple identical problem identification results are used as target problem identification results, and the target problem identification results in the problem identification result set are deduplicated to obtain deduplicated problem identification results, wherein the problem identification result set includes position overlapping problem identification results and text problem identification results.

[0097] In some exemplary embodiments, the method further comprises:

[0098] Get screenshots of multiple different pages to be identified;

[0099] After obtaining the problem identification result after deduplication, the method further includes:

[0100] The deduplicated problem identification results are marked on multiple different screenshots of the pages to be identified, and the positions of the marked deduplicated problem identification results and the positions of the page elements corresponding to the deduplicated problem identification results on the multiple different screenshots of the pages to be identified correspond one to one.

[0101] By marking the deduplicated problem identification results on multiple different screenshots of the pages to be identified, and marking the positions of the deduplicated problem identification results and the positions of the page elements corresponding to the deduplicated problem identification results on the screenshots of multiple different pages to be identified in a one-to-one correspondence, exemplarily, by drawing a border of the page element where there is an identification problem on the screenshot of the corresponding page, and adding specific descriptive information of the identification problem, it is convenient to check the problem.

[0102] In some exemplary embodiments, the method further comprises:

[0103] Utilize an automated testing framework to perform clicks on the target application;

[0104] Obtain the view structure information of the page before the click and the view structure information of the page after the click in the target application;

[0105] Based on the view structure information of the page before the click and the view structure information of the page after the click, a similarity comparison is performed;

[0106] Determine whether the result of the similarity comparison is less than a first preset similarity threshold;

[0107] If so, determine that the page after the click is the page to be identified.

[0108] Specifically, the first preset similarity threshold can be set according to specific settings, exemplarily set to 90%. Based on the automatic click operation, a similarity comparison is performed on the obtained view structure information of the page before the click and the view structure information of the page after the click. When the result of the similarity comparison is less than the first preset similarity threshold of 90%, the page after the click is determined to be the page to be identified.

[0109] The present application also provides an automatic click method to obtain the view structure information and screenshots of all target programs in the Android system. First, UIAutomator, the automated testing framework provided by Android, is used to perform click operations, which can also be used to obtain the view structure information of the application page. Exemplarily, the following click touch methods are configured: within the page range of the target program, randomly select coordinates and click once (Random click); between the page elements on the page of the target program, select any clickable element and perform a click (Random click clickable); within the page of the target program, randomly select the starting point and end point coordinates and perform a slide (Random swipe); among the page elements on the page of the target program, select any slidable page element and perform a slide (Random swipescrollable); pull down the screen once to open the negative one screen (Swipe down); slide up the screen once to open the corresponding page (Swipe up); automatically click and slide within the page of the target program (Auto click); click the "All Applications" icon (Click Allapp); return to the home page (Click Home). By defining multiple touch modes, you can configure automatic click modes according to different target applications. For example, for a certain target application, only random clicks, random sliding, and automatic clicks are configured on the target application page to prevent jumping to other target application pages or entering the negative one screen page during the click of the target application. In addition, you can also suppress repeated clicks on page elements by recording the click path, and improve click efficiency by configuring touch modes and automatic clicks of recorded paths.

[0110] First, see Figure 2 , Figure 2 This is a schematic diagram of an automatic click flow of a method for identifying page element problems provided by an embodiment of the present application. The steps are as follows:

[0111] Step S201: Obtain and save the view structure information and screenshot of the page before clicking of the target application;

[0112] Specifically, after obtaining the view structure information and screenshots of the page before clicking on the target application, the view structure information can be compared with a set of saved view structure information. When the view structure information is the same as any one of the view structure information in the set of saved view structure information, it indicates that the view structure information and screenshots of the page before clicking have been saved and do not need to be saved again. The method for determining when the view structure information and screenshots have been saved can be to perform a similarity comparison. Exemplarily, when the similarity comparison result between the view structure information and any one of the view structure information in the set of saved view structure information is greater than or equal to a second preset similarity threshold of 90%, it is determined that the view structure information and screenshots of the page before clicking have been saved.

[0113] Step S202: selecting an unclicked page element in the page element set of the page before clicking;

[0114] Specifically, a method for determining an unclicked page element may be to save the page elements that have been clicked, and compare the selected page element with a set of saved clicked page elements in the page where the page element is located. If the page element is not in the set of saved clicked page elements, then the page element is determined to be an unclicked page element.

[0115] Step S203: determining whether the unclicked page element is a page element for returning to the previous page;

[0116] If not, execute step S204: click on the unclicked page element to obtain the clicked page;

[0117] If yes, after rearranging the click order of the unclicked page elements, the process returns to step S202;

[0118] Step S205: Obtaining the view information and screenshot of the page after clicking;

[0119] Step S206: Determine whether the page after clicking is the same as the page before clicking;

[0120] Specifically, a similarity comparison is performed on the obtained view structure information of the page before the click and the view structure information of the page after the click; it is determined whether the result of the similarity comparison is less than a first preset similarity threshold; if so, it is determined whether the page after the click is the same as the page before the click; exemplarily, the first preset similarity threshold is set to 90%, and based on the automatic click operation, a similarity comparison is performed on the obtained view structure information of the page before the click and the view structure information of the page after the click; when the result of the similarity comparison is greater than or equal to the first preset similarity threshold of 90%, the page after the click is the same as the page before the click, and the page after the click is the page to be identified.

[0121] Step S207: Update the page after clicking to the page before clicking, until the only unclicked page element in the page element set of the page before clicking is the page element for returning to the previous page, and click the page element for returning to the previous page.

[0122] Specifically, click on the page element to return to the previous page. After returning to the previous page, continue to return to step S201 until all page elements of the target application are clicked.

[0123] Specifically, after the click is completed, you can also compare and search the saved set of clicked page elements and the saved view structure information set. It should be noted that the same page element on different pages needs to be saved, and the saved clicked page element information contains the page information where it is located. Find out whether the page elements contained in the saved view structure information set are more than the page elements in the saved set of clicked page elements. The extra page elements are the unclicked page elements. Based on the page structure information corresponding to the unclicked page elements, find the page where the unclicked page element is located, and then jump back to the page to click on the unclicked page element, thereby further ensuring the click coverage.

[0124] In addition, when saving the view structure information and screenshots of the page before clicking the target application, the saving time is recorded. When the latest saving time meets the preset time, it is determined that the target application is clicked and another target application can be clicked. For example, the preset time is 120s, the last saving time is 08:00:00, and the current time is 08:02:00, which means that the target application is judged to be clicked and completed.

[0125] The following is a specific embodiment of a method for identifying page element problems provided by the present application. Click on a target application of the Android system to obtain page 1 of the target application. Page 1 is the page to be identified. The page elements in page 1 include A1, B1, C1, and D1. First, the view structure information and screenshot of page 1 are obtained and saved. A1 is selected, and it is determined that A1 is a page element for returning to the previous page. After rearranging the click order of the unclicked page elements, B1 is selected, and it is determined that B1 is not a page element for returning to the previous page. After clicking B1, the view structure information and screenshot of the page after the click are obtained. The view structure information of the page after the click is compared with the view structure information of the page before the click. The similarity result is 50%, which is less than The first preset similarity threshold is 90%, so the page after clicking is page 2, page 2 is different from page 1, page 2 is the page to be identified, and the view structure information and screenshots of page 2 are saved; the page elements in page 2 include A2, C2, and D2, wherein A2 is a page element for returning to the previous page, and when C2 is selected, it is determined that C2 is not a page element for returning to the previous page, and after clicking C2, the view structure information and screenshots of the page after clicking are obtained, and the view structure information of the page after clicking is compared with the view structure information of the page before clicking, and the result is a similarity of 91%, which is greater than the first preset similarity threshold of 90%, and it is determined that the page after clicking is the same as page 2, and the obtained view structure information and screenshots of the page after clicking are not saved repeatedly; D is selected 2, it is determined that D2 is not a page element for returning to the previous page. After clicking D2, the view structure information and screenshot of the page after the click are obtained. The view structure information of the page after the click is compared with the view structure information of the page before the click. The result is a similarity of 70%, which is less than the first preset similarity threshold of 90%. It is determined that the page after clicking D2 is different from page 2. After clicking D2, the page is page 3. The view structure information of page 3 is compared with the view structure information in the saved view structure information set. The comparison result is 80%, which is less than the second preset similarity threshold of 90%. The obtained view structure information and screenshot of page 3 are saved; the page elements in page 3 only include A3, and A3 is a page element for returning to the previous page. Click After A3 is clicked, the view structure information and screenshot of the page after the click are obtained, and the view structure information of the page after the click is compared with the view structure information of the page before the click. The result is a similarity of 70%, which is less than the first preset similarity threshold of 90%. After clicking A3, the page is different from page 3 and is a page to be identified. The obtained view structure information of page 2 is compared with the view structure information in the saved view structure information set. The comparison result is 100%, which is greater than the second preset similarity threshold of 90%, that is, page 2, so the view structure information and screenshot of page 2 are no longer saved; it is determined that the only unclicked page element in page 2 is A2, and A2 is clicked to obtain the view structure information and screenshot after the click and continue to judge.It is determined that the page after clicking A2 is different from page 2 and is the page to be identified. After similarity comparison, it is page 1. It is determined that the view structure information and screenshots of page 1 have been saved, and the view structure information and screenshots of page 1 are not saved repeatedly. Since D1 on page 1 has not been clicked, D1 is selected and judged according to the above steps until the page elements on all pages of the target application are clicked. During the clicking process, the clicked page elements and the page information on which they are located are recorded. By comparing the saved page view structure information set with the saved clicked page element set, the unclicked page elements and the page on which they are located can be confirmed, and the page can be directly jumped to the page for clicking. When the click time threshold is met, the click on the target application is stopped, and the click on the next target application can be continued. Then, based on the obtained view structure information of all pages in the target application, the problem is identified. The layout information of B1 contains the identifier of B1. According to the identifier, the layout code information corresponding to the identifier is found in the page layout code file, which is the layout code information of B1. According to the order in the page view structure information, the layout code information of C1 is continued to be searched. The layout code information of C1 does not contain display text information and identifiers. According to the relative positions of C1 and B1 in the view structure text generated by the view structure information and the position of B1's layout code information in the page layout code file, the layout code information of C1 can be found. After the layout code information of each page element in all pages is obtained, for the page element in the layout information containing the display text information, the font size, whether it is bold or not, and other attributes in the text are determined according to its layout code information, and the font language and display text in the layout information are calculated to obtain the target display text information, including the width and height of the target display text. According to the page size of the page element in the layout code information, the font size of the page element in the layout code information is determined according to its layout code information. The width of the page element, the height of the page element, the left and right margins of the page element, the top and bottom margins of the page element, and the width and height of the icon are calculated to obtain the current display text information of the page element, and the current display text information of the page element and the target display text information are used for text problem recognition, so as to obtain the text problem recognition result, and the level of each page element on the page is determined according to the view structure information, and the position overlaps between multiple page elements at the same level according to the page element boundary coordinate information contained in their respective layout information to obtain the position overlap recognition result, so as to obtain the problem recognition result set of the entire target application, C1 and C2 are the same page element C on different pages, and C1 and C2 both have text problem recognition results of incomplete display of fixed text height, and the two text problem recognition results of incomplete display of fixed text height of C are deduplicated, and only one text problem recognition result of incomplete display of fixed text height of C is saved, and after obtaining the deduplicated problem recognition result, the deduplicated problem recognition result is marked,The recognition result of a text problem of C with a fixed text height and incomplete display can be marked on the screenshot position of the page where C1 is located, or on the screenshot position of the page where C2 is located. Each problem recognition result mark position corresponds to the position on the screenshot of the page where the corresponding page element is located.

[0126] It can be seen from the above technical scheme of the embodiment of the present application that the embodiment of the present application obtains the view structure information of the page to be identified of the target application; the view structure information includes the layout information of each page element in the page to be identified; for each page element in the page to be identified, based on the layout information of the page element, the page layout code file of the page to be identified is searched to obtain the layout code information of the page element for defining the layout of the page element; when the layout information includes display text information, calculation is performed based on the layout code information and the layout information, and display text problem recognition is performed on the current display text information and the target display text information of the page element obtained based on the calculation, to obtain the problem recognition result of the page element, thereby achieving the purpose of automatically performing display text problem recognition on each page element in the page to be identified.

[0127] The present application also provides a device for identifying page element problems. Figure 3 It is a structural block diagram of a device for identifying page element problems, such as Figure 3 As shown, the page element problem identification device 300 includes:

[0128] According to a second aspect of an embodiment of the present application, a device 300 for identifying page element problems is provided, the device comprising:

[0129] The module 310 for obtaining view structure information is used to obtain view structure information of the page to be identified of the target application; the view structure information includes layout information of each page element in the page to be identified;

[0130] The layout code information search module 320 is used to search the page layout code file of the page to be identified for each page element in the page to be identified based on the layout information of the page element to obtain the layout code information of the page element; the layout code information is used to define the layout of the page element;

[0131] A calculation module 330, for performing calculation based on the layout code information and the layout information to obtain the current display text information and the target display text information of the page element when the layout information includes the display text information;

[0132] The text problem identification module 340 is used to identify display text problems based on the current display text information and target display text information of the page element, and obtain the text problem identification result of the page element.

[0133] In an exemplary embodiment, the layout information includes boundary coordinate information of the page element on the page to be identified; the apparatus 300 further includes:

[0134] A structural level determination module is used to determine the structural level corresponding to each page element in the page to be identified based on the view structure information;

[0135] The position overlap problem identification module is used to identify the position overlap problems between page elements of the same structural level in the page to be identified based on the boundary coordinate information of each page element in the page to be identified, and obtain the position overlap problem identification result of each page element in the page to be identified.

[0136] In an exemplary embodiment, when the to-be-identified page includes a plurality of different to-be-identified pages in the target application, the apparatus 300 further includes:

[0137] A deduplication module is used to deduplicate the target problem identification results in the problem identification result set to obtain deduplicated problem identification results; the target problem identification results represent multiple identical problem identification results of the same page element in multiple different pages to be identified; the problem identification result set includes position overlapping problem identification results and text problem identification results.

[0138] In an exemplary embodiment, the apparatus 300 further includes:

[0139] A screenshot acquisition module is used to acquire screenshots of multiple different pages to be identified;

[0140] A marking module is used to mark the deduplicated problem identification results on multiple different screenshots of the pages to be identified, and the positions of the marked deduplicated problem identification results and the positions of the page elements corresponding to the deduplicated problem identification results on the screenshots of multiple different pages to be identified correspond one to one.

[0141] In an exemplary embodiment, the layout code information search module 320 includes:

[0142] A first search module is used to search the page layout code file based on the target information to obtain the layout code information of the page element when the layout information includes the target information;

[0143] The second search module is used to search the view structure text generated based on the view structure information of the page to be identified when the layout information does not contain the target information, so as to obtain the layout information of the target page element; the layout information of the target page element includes the target identifier of the target page element; based on the target identifier, the view structure text is searched to obtain the layout code information corresponding to the target identifier, and the layout code information corresponding to the target identifier is determined as the layout code information of the target page element; based on the position and relative position information of the layout code information of the target page element in the view structure text, the page layout code file is searched to obtain the layout code information of the page element; the relative position information represents the relative position of the layout information of the target page element and the layout information of the page element in the view structure text.

[0144] In an exemplary embodiment, the first search module includes:

[0145] An identification search module is used to search the page layout code file based on the identification when the target information includes the identification of the page element, obtain the layout code information corresponding to the identification, and determine the layout code information corresponding to the identification as the layout code information of the page element;

[0146] The display text information search module searches for the page layout code file based on the display text information when the target information does not contain an identifier, obtains the layout code information containing the display text information, and determines the layout code information containing the display text information as the layout code information of the page element.

[0147] In an exemplary embodiment, the apparatus 300 further includes:

[0148] An automated testing framework to perform clicks on the target application;

[0149] A module for obtaining click view structure information is used to obtain view structure information of a page before and after the click in a target application;

[0150] A similarity comparison module, used for performing similarity comparison based on the view structure information of the page before the click and the view structure information of the page after the click;

[0151] A similarity determination module is used to determine whether a similarity comparison result is less than a first preset similarity threshold;

[0152] The module for determining a page to be identified is used to determine that the page after the click is a page to be identified when the result of the similarity comparison is less than a first preset similarity threshold.

[0153] It should be noted that the device provided in the above embodiment, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0154] An embodiment of the present application also provides an electronic device, including a processor; a memory for storing instructions executable by the processor; wherein, when the processor is configured to execute the instructions stored in the memory, the page element problem identification method provided in any of the above-mentioned embodiments is implemented.

[0155] The electronic device may be a terminal, a server or a similar computing device. For example, the electronic device is a terminal. Figure 4 is a block diagram of an electronic device running a method for identifying page element problems according to an exemplary embodiment, specifically:

[0156] The terminal may include components such as an RF (Radio Frequency) circuit 410, a memory 420 including one or more computer-readable storage media, an input unit 430, a display unit 440, a sensor 450, an audio circuit 360, a WiFi (wireless fidelity) module 470, a processor 480 including one or more processing cores, and a power supply 490. Those skilled in the art will appreciate that Figure 3 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0157] The RF circuit 410 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is handed over to one or more processors 480 for processing; in addition, the data related to the uplink is sent to the base station. Generally, the RF circuit 410 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a user identity module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, etc. In addition, the RF circuit 410 can also communicate with the network and other terminals through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), etc.

[0158] The memory 420 can be used to store software programs and modules, and the processor 480 executes various functional applications and data processing by running the software programs and modules stored in the memory 420. The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, application programs required for functions, etc.; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 420 may also include a memory controller to provide the processor 480 and the input unit 430 with access to the memory 420.

[0159] The input unit 430 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 430 may include a touch-sensitive surface 431 and other input devices 432. The touch-sensitive surface 431, also known as a touch display screen or a touchpad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 431), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 431 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 480, and can receive and execute commands sent by the processor 480. In addition, the touch-sensitive surface 431 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 431, the input unit 430 may further include other input devices 432. Specifically, other input devices 432 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

[0160] The display unit 440 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 440 may include a display panel 441, and optionally, the display panel 441 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 431 may cover the display panel 441, and when the touch-sensitive surface 431 detects a touch operation on or near it, it is transmitted to the processor 480 to determine the type of the touch event, and then the processor 480 provides corresponding visual output on the display panel 441 according to the type of the touch event. Among them, the touch-sensitive surface 431 and the display panel 441 can be two independent components to realize the input and output functions, but in some embodiments, the touch-sensitive surface 431 and the display panel 441 can also be integrated to realize the input and output functions.

[0161] The terminal may also include at least one sensor 450, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 441 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 441 and / or the backlight when the terminal is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the terminal posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can be configured in the terminal, they will not be repeated here.

[0162] The audio circuit 460, the speaker 461, and the microphone 462 can provide an audio interface between the user and the terminal. The audio circuit 460 can transmit the received audio data to the speaker 461 after converting the received audio data into an electrical signal, which is converted into a sound signal for output by the speaker 461; on the other hand, the microphone 462 converts the collected sound signal into an electrical signal, which is received by the audio circuit 460 and converted into audio data, and then the audio data is output to the processor 480 for processing, and then sent to another terminal through the RF circuit 410, or the audio data is output to the memory 420 for further processing. The audio circuit 460 may also include an earplug jack to provide communication between an external headset and the terminal.

[0163] WiFi is a short-range wireless transmission technology. The terminal can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 470, which provides users with wireless broadband Internet access. Figure 4 A WiFi module 470 is shown, but it is understandable that it is not an essential component of the terminal and can be omitted as needed without changing the essence of the invention.

[0164] The processor 480 is the control center of the terminal, and uses various interfaces and lines to connect various parts of the entire terminal. It executes various functions of the terminal and processes data by running or executing software programs and / or modules stored in the memory 420, and calling data stored in the memory 420. Optionally, the processor 480 may include one or more processing cores; preferably, the processor 480 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user pages, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 480.

[0165] The terminal also includes a power supply 490 (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the processor 480 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 490 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0166] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one instruction or at least one program. The at least one instruction or at least one program is loaded and executed by a processor to implement any page element problem identification method provided in the above method embodiments.

[0167] Optionally, in an embodiment of the present application, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0168] An embodiment of the present application also provides a computer program, which, when executed by a processor, implements any one of the page element problem identification methods provided in the above method embodiments.

[0169] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0170] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0171] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0172] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for identifying page element problems, characterized in that: The method comprises: Acquire view structure information of a page to be identified of a target application; the view structure information includes layout information of each page element in the page to be identified; For each page element in the page to be identified, based on the layout information of the page element, searching the page layout code file of the page to be identified to obtain the layout code information of the page element; the layout code information is used to define the layout of the page element; When the layout information includes display text information, performing calculation based on the layout code information and the layout information to obtain current display text information and target display text information of the page element; Display text problem recognition is performed based on the current display text information of the page element and the target display text information to obtain a text problem recognition result of the page element.

2. A method for identifying page element problems according to claim 1, characterized in that: The layout information includes boundary coordinate information of the page element on the page to be identified; After obtaining the view structure information of the to-be-identified page of the target application, the method further includes: Based on the view structure information, determining a structural level corresponding to each page element in the to-be-identified page; For the page to be identified, based on the boundary coordinate information of each page element in the page to be identified, the position overlap problem between the page elements of the same structural level in the page to be identified is identified to obtain the position overlap problem identification result of each page element in the page to be identified.

3. A method for identifying page element problems according to claim 2, characterized in that: When the to-be-identified page includes a plurality of different to-be-identified pages in the target application, the method further includes: The target problem identification results in the problem identification result set are deduplicated to obtain deduplicated problem identification results; the target problem identification results represent multiple identical problem identification results of the same page element in the multiple different pages to be identified; the problem identification result set includes position overlapping problem identification results and text problem identification results.

4. A method for identifying page element problems according to claim 3, characterized in that: The method further comprises: Obtaining screenshots of the multiple different pages to be identified; After obtaining the problem identification result after deduplication, the method further includes: The deduplicated problem identification results are marked on the screenshots of the multiple different pages to be identified, and the positions of the deduplicated problem identification results and the positions of the page elements corresponding to the deduplicated problem identification results on the screenshots of the multiple different pages to be identified are marked in one-to-one correspondence.

5. A method for identifying page element problems according to claim 1, characterized in that: The searching of the page layout code file based on the layout information to obtain the layout code information of the page element includes: When the layout information includes target information, searching the page layout code file based on the target information to obtain the layout code information of the page element; When the layout information does not contain target information, a search is performed based on the view structure text generated based on the view structure information of the page to be identified to obtain the layout information of the target page element; the layout information of the target page element includes the target identifier of the target page element; based on the target identifier, the view structure text is searched to obtain the layout code information corresponding to the target identifier, and the layout code information corresponding to the target identifier is determined as the layout code information of the target page element; based on the position and relative position information of the layout code information of the target page element in the view structure text, the page layout code file is searched to obtain the layout code information of the page element; the relative position information represents the relative position of the layout information of the target page element and the layout information of the page element in the view structure text.

6. A method for identifying page element problems according to claim 5, characterized in that: The target information includes display text information; based on the target information, searching the page layout code file to obtain the layout code information of the page element includes: When the target information includes the identifier of the page element, based on the identifier, searching the page layout code file to obtain layout code information corresponding to the identifier, and determining the layout code information corresponding to the identifier as the layout code information of the page element; When the target information does not contain the identifier, the page layout code file is searched based on the display text information to obtain layout code information containing the display text information, and the layout code information containing the display text information is determined as the layout code information of the page element.

7. A method for identifying page element problems according to claim 1, characterized in that: The method further comprises: Using an automated testing framework, executing clicks on the target application; Obtaining view structure information of a page before clicking and view structure information of a page after clicking in the target application; Performing a similarity comparison based on the view structure information of the page before the click and the view structure information of the page after the click; Determining whether the result of the similarity comparison is less than a first preset similarity threshold; If so, determine that the post-click page is the page to be identified.

8. A device for identifying page element problems, characterized in that: The device comprises: A view structure information acquisition module, used to acquire view structure information of a page to be identified of a target application; the view structure information includes layout information of each page element in the page to be identified; A layout code information search module is used to search the page layout code file of the page to be identified for each page element in the page to be identified based on the layout information of the page element to obtain the layout code information of the page element; the layout code information is used to define the layout of the page element; a calculation module, configured to, when the layout information includes display text information, perform calculation based on the layout code information and the layout information to obtain current display text information and target display text information of the page element; The text problem identification module is used to identify the display text problem based on the current display text information of the page element and the target display text information to obtain the text problem identification result of the page element.

9. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement a page element problem identification method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement a page element problem identification method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Problem positioning method based on web front-end testing as well as related device and system

    CN105760290A

  • Method and device for identifying front-end page design error

    CN109960772A

  • Page defect management method and terminal equipment

    CN110362482A

  • Detecting truncation and overlap defects on webpage

    US20220327279A1