A method, device, computer equipment, and storage medium for obtaining page attributes
By monitoring and intercepting user operations on the terminal screen, the attribute information of the page controls is obtained and displayed in real time, which solves the tedious problem of obtaining page information in the existing technology and improves the efficiency of application development.
Patent Information
- Application Number
- CN201910529171.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-19
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2039-06-19
AI Technical Summary
During the application development process, obtaining information about page controls is cumbersome and affects development efficiency. Especially when a large number of page controls need to be debugged individually, a lot of time is wasted.
By monitoring user operations on the terminal screen, intercepting user operation events, identifying page controls and obtaining their attribute information, creating information display controls to display control attributes in real time, supporting development and test modes, automatically displaying control information, and operating independently of the compiler.
It greatly improves the efficiency of application development, facilitates debugging by developers and acceptance by testers, reduces human errors, and improves work efficiency.
Smart Images

Figure CN110442510B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to a method and device for obtaining page attributes, a computer device, and a storage medium. Background Art
[0002] The current application development process requires obtaining some information about the application's page to debug the application. For example, during the development process, the developer needs to know the memory information of a certain page control when the application is running, or during the test acceptance process, the tester or designer needs to know the layout information of the page control involved in a certain area of the terminal screen when the application is running. By judging whether this information meets the requirements, it is determined whether the program needs to be modified, thereby ensuring the display effect of the application on the terminal and ensuring that the application runs stably while occupying less system resources.
[0003] In the prior art, the above-mentioned layout information is generally obtained by developers by looking at the coordinate configuration in the code, and converting the configured coordinates into the layout information of each terminal through the resolution size ratio of different terminal screens, while the memory information is obtained through the console or debug output information, and it must be compiled once each time it is obtained. The process is cumbersome and prone to errors. When faced with a large number of page controls that need to obtain various page information, separate debugging for each page control will waste a lot of time and affect program development efficiency. Summary of the invention
[0004] In view of this, the present invention provides a page attribute acquisition method, device, computer equipment, and storage medium to solve the problem that when page information of a large number of pages in an application needs to be acquired in order to debug or test the application during the development of the application, the acquisition process is cumbersome and affects the efficiency of program development.
[0005] Specifically, the embodiment of the present invention adopts the following technical solution.
[0006] In a first aspect, an embodiment of the present invention provides a method for obtaining page attributes, wherein the page attributes include control attribute information of at least one page control, and the method includes:
[0007] Monitoring user operations in a page displayed on a terminal screen, and when a user operation is detected, intercepting an event generated by the user operation, determining a page control to be triggered by the user operation in the page, and determining a current working mode of the page;
[0008] Reading configuration information corresponding to the working mode, and acquiring control attribute information of the page control according to the configuration information;
[0009] An information display control is created in the page displayed on the terminal screen, the control attribute information is displayed through the information display control, and the page control responds to the user operation to complete the corresponding operation.
[0010] As an exemplified embodiment of the present invention, before monitoring the user operation in the page displayed on the terminal screen, the method further includes:
[0011] Adding a status identifier to the application to which the page belongs, the status identifier being used to configure a current working mode of the page displayed on the terminal screen, wherein the working mode includes a test mode and a development mode;
[0012] Based on the state identifier, the content categories of the page attributes to be displayed are configured for the test mode and the development mode respectively to obtain the corresponding configuration information.
[0013] As an implementable manner of the present invention, after acquiring the control attribute information of the page control according to the configuration information, the method further includes:
[0014] Extracting a subclass identification parameter from the control attribute information to determine whether the page control contains a sub-control, wherein when the subclass identification parameter is empty, it is determined that there is no sub-control;
[0015] If the subclass identification parameter is not empty, the parameter values contained in the subclass identification parameter are looped through to obtain at least one subcontrol existing in the page control, and corresponding subcontrol information is obtained; wherein the subcontrol information includes the quantity information and type information of the subcontrol, as well as the control attribute information of the subcontrol itself.
[0016] As an exemplified embodiment of the present invention, creating an information display control in a page displayed on the terminal screen includes:
[0017] At least one first information display control is created for the page control, and at least one second information display control is created for the sub-control.
[0018] As an exemplified manner of the present invention, before displaying the control attribute information through the information display control, the method further includes:
[0019] Determine the information category included in the control attribute information, and when the control attribute information includes at least two information categories, create at least one information display control for each of the information categories.
[0020] As an implementable manner of the present invention, before displaying the control attribute information through the information display control, the method further includes:
[0021] It is determined whether there is content to be processed in the control attribute information. If so, the content to be processed in the control attribute information is processed according to a preset processing rule to obtain processed control attribute information.
[0022] In a second aspect, an embodiment of the present invention provides a page attribute acquisition device, which is used to acquire control attribute information of at least one page control in a page, including:
[0023] A control determination module is used to monitor user operations in a page displayed on a terminal screen, and when a user operation is detected, intercept an event generated by the user operation, determine a page control to be triggered by the user operation in the page, and determine a current working mode of the page;
[0024] An attribute acquisition module, used for reading configuration information corresponding to the working mode, and acquiring control attribute information of the page control according to the configuration information;
[0025] The attribute display control module is used to create an information display control in the page displayed on the terminal screen, display the control attribute information through the information display control, and make the page control respond to the user operation to complete the corresponding operation.
[0026] As an implementable method of the present invention, the device also includes a configuration module, which is used to add a status identifier to the application to which the page belongs, and the status identifier is used to configure the current working mode of the page displayed on the terminal screen, wherein the working mode includes a test mode and a development mode; and is used to configure the content categories of the page attributes that need to be displayed for the test mode and the development mode respectively based on the status identifier to obtain the corresponding configuration information.
[0027] In a third aspect, an embodiment of the present invention provides a computer device, including:
[0028] at least one processor; and,
[0029] a memory communicatively connected to the at least one processor; wherein,
[0030] The memory stores instructions that can be executed by the at least one processor. When the instructions are executed by the at least one processor, the at least one processor is enabled to perform the steps of the page attribute acquisition method as described above.
[0031] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which computer-readable instructions are stored. When the computer-readable instructions are executed by at least one processor, the steps of the page attribute acquisition method described above are implemented.
[0032] According to the page attribute acquisition method, device, computer equipment, and storage medium provided by the embodiments of the present invention, by intercepting the user operation when the operation of touching the page is detected, the control attribute information of the page control corresponding to the user operation is obtained and displayed based on the intercepted operation. The information is intuitive, and the control attribute information of the page control in the page can be automatically displayed in real time by clicking on the page. Therefore, when viewing the control attribute information, it is completely independent of the compiler, and it can be operated and viewed in the interface of the application, which is convenient for developers to debug during the development process. At the same time, when testers test or designers accept, it is completely independent of the developers to perform related tests and acceptance processing, which can greatly improve the development efficiency of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the scheme of the present invention, a brief introduction is given below to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0034] Figure 1 A flow chart of a method for obtaining page attributes provided by an embodiment of the present invention;
[0035] Figure 2 Another structural block diagram of the device for acquiring page attributes provided by an embodiment of the present invention;
[0036] Figure 3 A structural block diagram of a device for acquiring page attributes provided by an embodiment of the present invention;
[0037] Figure 4 A structural block diagram of an attribute acquisition module provided in an embodiment of the present invention;
[0038] Figure 5 A structural block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the technical staff of this technical field better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Unless otherwise defined, all technical and scientific terms used in this article have the same meaning as those commonly understood by the technical staff of the technical field of the present invention.
[0040] The phrase "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0041] The embodiment of the present invention provides a method for obtaining page attributes, wherein the page attributes include control attribute information of at least one page control. The method for obtaining page attributes can be used to obtain and display control attribute information of each control in an application page, and is applied to program development to improve program development efficiency. Specifically, Figure 1 As shown, the page attribute acquisition method includes:
[0042] S1. Monitoring user operations in a page displayed on a terminal screen. When a user operation is detected, intercepting an event generated by the user operation, determining a page control to be triggered by the user operation in the page, and determining a current working mode of the page;
[0043] S2. Read configuration information corresponding to the working mode, and obtain control attribute information of the page control according to the configuration information;
[0044] S3. Creating an information display control in the page displayed on the terminal screen, displaying the control attribute information through the information display control, and making the page control respond to the user operation to complete the corresponding operation.
[0045] For step S1, in an embodiment of the present invention, the user operation may be a touch operation or a click operation, such as a touch operation or a click operation implemented on a screen of a mobile terminal such as a mobile phone or a tablet computer by a touch medium such as a human hand or a touch pen, or a touch operation or a click operation implemented on a display screen of a PC terminal by a mouse cursor on the screen. For a touch screen, when a user touches the screen, the finger action or the touch pen action used to trigger a page operation may include "press", "lift", "press + lift", "press + drag", "press + drag + lift", etc., then the user operation on the touch screen may be any one of these types of finger actions or touch pen actions, and for an interface operated by a mouse, the mouse action used to trigger a page operation may include "hover", "press", "lift", "press + lift", "press + drag", "press + drag + lift", etc., then the user operation on the interface operated by a mouse may be any one of these types of mouse actions. In an actual implementation method, the specific action of the user operation is not limited in this embodiment. At the same time, for the convenience of description, this solution is mainly described below by taking a mobile terminal with a touch screen such as a mobile phone or a tablet computer as an example.
[0046] After a user operation occurs, the position where the user operation occurs on the terminal screen can be obtained by the sensor in the user screen, and the page control at the click position in the page can be determined by the position where the user operation occurs. During the operation of the application, the page control corresponding to the click position will directly respond to the user operation, such as jumping or outputting specific content. However, in an embodiment of the present invention, after the user operation occurs, the event is intercepted, and the page control corresponding to the click position will not directly respond to the user operation. This is the basis for the embodiment of the present invention to obtain page attributes. In an embodiment of the present invention, the determined page controls can be of various types, such as a button control (UIButton), a text label control (UILabel), a scrollable text display control (UITextView), a picture display control (UIImageView), a text input box control (UITextField), etc.
[0047] For step S2, the control attribute information of the page control is obtained, which is specifically achieved by obtaining the object created by the page control in the memory. When the object corresponding to the page control is created, the information of the object can be obtained. In the embodiment of the present invention, for different page controls, the control attribute information obtained may be different. For example, for a button control, the control attribute information obtained may include memory information and layout information. For a picture display control, the control attribute information obtained may include picture information (picture format, size, path, etc.) in addition to memory information and layout information. That is, the content contained in the control attribute information of each page control can be divided into multiple information categories. In some embodiments, the control attribute information at least includes the memory information and layout information of the page control.
[0048] In an actual implementation, the control attribute information has different uses for developers, testers, and acceptance personnel, and the specific content contained in the acquired control attribute information also differs. For example, in development mode, developers generally only need to obtain the control attribute information of the page controls currently being developed to verify whether the page controls currently being developed can run normally. Therefore, it is only necessary to obtain part of the page controls or part of the information of the page controls. In test mode, testers need to test all controls in each page of the application to test whether each page control meets the project requirements. Therefore, they need to obtain the most complete control attribute information.
[0049] In this embodiment, the configuration information includes a rule for obtaining control attribute information, which defines at least one page control for which control attribute information needs to be obtained, and the content of the control attribute information that each page control needs to obtain, and the corresponding acquisition rules for each working mode are different. When the working mode is determined, the acquisition rules of the control attribute information based on the configuration can meet the acquisition of control attribute information in a specific scenario. In actual situations, the control attribute information that needs to be obtained for different types of page controls can be pre-configured to meet different user needs, that is, the configuration information can be pre-set, and the content of the specific control attribute information to be obtained is configured by configuring the working mode of the page when the application is running. Therefore, in some embodiments, before the user operation in the page displayed on the terminal screen is monitored, the method further includes: adding a status identifier to the application to which the page belongs, the status identifier is used to configure the current working mode of the page displayed on the terminal screen, wherein the working mode may include a test mode and a development mode; based on the status identifier, the corresponding configuration information is obtained for the content categories of the page attributes that need to be displayed in the test mode and the development mode respectively, and different control attribute information acquisition rules can be configured accordingly for the characteristics of the development mode and the test mode themselves to obtain control attribute information for different purposes.
[0050] In an embodiment of the present invention, a page may include multiple page controls, and there may be an inclusion relationship between the multiple page controls, that is, there are parent controls and child controls, and a parent control may include at least one child control. In some embodiments, after obtaining the control attribute information of the page control according to the configuration information, the method further includes: extracting a subclass identification parameter from the control attribute information to determine whether the page control contains a child control, and determining whether the page control contains a child control, wherein when the subclass identification parameter is empty, it is determined that there is no child control, and if the subclass identification parameter is not empty, the parameter value contained in the subclass identification parameter is looped through to obtain at least one child control existing in the page control, and the corresponding child control information is obtained; wherein the child control information may include the quantity information and type information of the child control, as well as the control attribute information of the child control itself.
[0051] For the case where the page control includes child controls, when the control attribute information obtained in step S2 includes the control attribute information of the parent control and the control attribute information of the child control, in some embodiments, the control attribute information of the parent control and the child control can be displayed in the same information display control.
[0052] In other embodiments, multiple information display controls may be created for displaying the control attribute information of one or more page controls, that is, the control attribute information of the parent control and the child control may be displayed in different information display controls. At this time, creating an information display control in the page displayed on the terminal screen includes: creating a first information display control for the page control as the parent control, and creating a second information display control for the child control. In an implementable solution, the control attribute information of the parent control may also be displayed in two or more information display controls, and the control attribute information of the child control may also be displayed in two or more information display controls. Therefore, when creating an information display control, at least one first information display control may be created for the page control as the parent control, and / or at least one second information display control may be created for the child control.
[0053] For step S3, the created information display control is suspended on the page. When creating the information display control, it is necessary to obtain the control configuration parameters, which include the shape, size, position, background and transparency of the information display control, as well as the text size, font type, text color, etc. of the control attribute information to be displayed. Among them, the shape of the information display control can be a suspended text box or a suspended ball, in which the control attribute information can be directly displayed, or a display box of the control attribute information can be popped up by clicking the suspended ball, that is, the control attribute information is initially in a hidden state, and then displayed after clicking the suspended ball. This situation is suitable for the situation where there is a lot of control attribute information to be displayed, and the user can click to view as needed; for the position of the information display control, it can be adjacent to the side of the displayed page control, or it can be in any blank space of the parent control corresponding to the displayed page control. Generally, a page includes two levels of controls, a parent control and several child controls set in the parent control. In a specific page, there may also be multi-level controls, such as a three-level control. In addition to being located in the parent control to which the displayed page control is directly subordinate, the information display control can also be located in a parent control at a lower level.
[0054] Since the control attribute information can be displayed in multiple information display controls, in some embodiments, before displaying the control attribute information through the information display control, the method further includes: determining the information category contained in the control attribute information, and when the control attribute information includes at least two information categories, creating at least one information display control for each information category. For example, if the control attribute information includes memory information and layout information, information display controls can be created for memory information and layout information respectively, and information display controls corresponding to different information categories can have different configuration parameters, that is, multiple information display controls have different shapes, sizes, positions, backgrounds, and transparencies, etc. For example, memory information is displayed in the form of a floating ball, and layout information is displayed in the form of a floating box. At the same time, the control attribute information displayed in each information display control has different text sizes, font types, and text colors, etc. For example, memory information is displayed in red text, and layout information is displayed in green text, etc.
[0055] As an implementable mode of the present invention, before displaying the control attribute information through the information display control, the method further includes: determining whether there is content that needs to be processed in the control attribute information, and if so, processing the content that needs to be processed in the control attribute information according to a preset processing rule to obtain the processed control attribute information. For example, the layout information of the page control, the layout information originally obtained in step S3 is the position information obtained from the code file, which needs to be converted into the position information of the page control relative to the terminal screen coordinates (screen relative position) based on the original position information. For the child control, it is also necessary to convert it into the position information relative to the parent control coordinates (parent control relative position). In this way, the control attribute information that originally required developers or testers to manually calculate can be automatically displayed. Since various manual conversions are not required, clicking on the page can automatically display the relevant control attribute information in real time. When viewing the control attribute information, it can be completely separated from the compiler, and it can be operated and viewed in the interface of the application, which helps to improve the development or testing efficiency.
[0056] It should be noted that in the above embodiment, for the touch screen, there may be a multi-touch situation, and the position where the user operation occurs on the terminal screen will correspond to multiple positions. The landing points of these multiple positions may be located in the area of the same page control, and the page control obtained at this time corresponds to one, and it is only necessary to obtain the control attribute information of one page control; or they may be distributed in the areas of different page controls, and the page controls obtained at this time correspond to multiple, and the control attribute information of multiple page controls can be obtained accordingly.
[0057] In the above embodiment of the present invention, the process of obtaining the control attribute information of the page control can be to obtain the control attribute information in real time. When the control attribute information of the page control changes, such as changes in memory information, if the information display control that displays the control attribute information is not closed, it can be updated and displayed in real time on the created information display control.
[0058] According to the page attribute acquisition method provided by the embodiment of the present invention, by intercepting the user operation when the operation of touching the page is detected, the control attribute information of the page control corresponding to the user operation is obtained and displayed based on the intercepted operation. The information is intuitive, and the control attribute information of the page control in the page can be automatically displayed in real time by clicking on the page. Therefore, when viewing the control attribute information, it is completely independent of the compiler, and it can be operated and viewed in the interface of the application. It is convenient for developers to debug during the development process. At the same time, when testers test or designers accept, it is completely independent of the developers to perform related tests and acceptance processing, which can greatly improve the development efficiency of the application.
[0059] The embodiment of the present invention provides a page attribute acquisition device, which is used to acquire the control attribute information of at least one page control in a page, such as Figure 2 As shown, the device includes a control determination module 31, an attribute acquisition module 32 and an attribute display control module 33, wherein:
[0060] The control determination module 31 is used to monitor user operations in the page displayed on the terminal screen. When a user operation is detected, the event generated by the user operation is intercepted, the page control to be triggered by the user operation in the page is determined, and the current working mode of the page is determined; the attribute acquisition module 32 is used to read the configuration information corresponding to the working mode, and obtain the control attribute information of the page control according to the configuration information; the attribute display control module 33 is used to create an information display control in the page displayed on the terminal screen, display the control attribute information through the information display control, and make the page control respond to the user operation to complete the corresponding user operation. For the relevant content of the user operation, the control attribute information and the information display control, please refer to the description in the above method embodiment, which will not be expanded here.
[0061] In actual situations, the control attribute information that needs to be obtained for different types of page controls can be pre-configured to meet different user needs. In some embodiments, for example Figure 3As shown, the device also includes a configuration module 34. Before the control determination module 31 monitors the user operation in the page displayed on the terminal screen, the configuration module 34 is used to add a status identifier to the application to which the page belongs, and the status identifier is used to configure the current working mode of the page displayed on the terminal screen, wherein the working mode includes a test mode and a development mode; and is used to configure the content category of the page attributes to be displayed for the test mode and the development mode respectively based on the status identifier to obtain the corresponding configuration information.
[0062] In actual implementation, the control attribute information has different uses for developers, testers, and acceptance personnel, and the specific content of the acquired control attribute information also varies. In some embodiments of the present invention, for example, Figure 4 As shown, the attribute acquisition module 32 includes a working mode determination unit 321, a configuration information acquisition unit 322 and an attribute acquisition unit 323, wherein the working mode determination unit 321 is used to determine the current working mode of the page displayed on the current terminal screen; the configuration information acquisition unit 322 is used to read the configuration information corresponding to the working mode, and the configuration information limits the content range contained in the control attribute information to be obtained; the attribute acquisition unit 323 is used to obtain the control attribute information according to the configuration information. In this embodiment, the configuration information contains the acquisition rule of the control attribute information, and the acquisition rule limits at least one page control for which the control attribute information needs to be obtained, and the content contained in the control attribute information that each page control needs to obtain, and the acquisition rule corresponding to each working mode is different. When the working mode is determined, the acquisition rule of the control attribute information based on the configuration can meet the acquisition of the control attribute information of a specific scenario.
[0063] In an embodiment of the present invention, a page may include multiple page controls, and there may be an inclusion relationship between the multiple page controls. In some embodiments, after the property acquisition module 32 acquires the control property information of the page control according to the configuration information, the control determination module 31 is further used to extract a subclass identification parameter from the control property information to determine whether the page control contains a sub-control, wherein when the subclass identification parameter is empty, it is determined that there is no sub-control; if the subclass identification parameter is not empty, the control determination module 31 is further used to loop through the parameter values contained in the subclass identification parameter to obtain at least one sub-control existing in the page control, and the property acquisition module 32 is further used to correspondingly acquire sub-control information, wherein the sub-control information may include the quantity information and type information of the sub-controls, as well as the control property information of the sub-controls themselves.
[0064] In the case where the page control includes a child control, the control attribute information of the parent control and the child control can be displayed in the same information display control or in different information display controls. As an implementable method of the present invention, when the attribute display control module 33 creates an information display control in the page displayed on the terminal screen, it is specifically used to create at least one first information display control for the page control and / or create at least one second information display control for the child control.
[0065] Since the control attribute information can be displayed in multiple information display controls, in some embodiments, the attribute display control module 33 is also used to determine the information category contained in the control attribute information before displaying the control attribute information through the information display control. When the control attribute information includes at least two information categories, at least one information display control is created for each information category.
[0066] In other embodiments, the attribute display control module 33 is further used to determine whether there is content that needs to be processed in the control attribute information before displaying the control attribute information through the information display control. If so, the content that needs to be processed in the control attribute information is processed according to preset processing rules to obtain the processed control attribute information.
[0067] The page attribute acquisition device provided by the embodiment of the present invention intercepts the user operation when the user page operation is detected, obtains the control attribute information of the page control corresponding to the user operation based on the intercepted operation and displays it. The information is intuitive, and the control attribute information of the page control in the page can be automatically displayed in real time by clicking on the page. Therefore, when viewing the control attribute information, it is completely independent of the compiler, and it can be operated and viewed in the interface of the application, which is convenient for developers to debug during the development process. At the same time, when testers test or designers accept, it is completely independent of the developers to perform related tests and acceptance processing, which can greatly improve the development efficiency of the application.
[0068] The embodiment of the present invention also provides a computer device, such as Figure 5 As shown, the computer device includes at least one processor 61 and a memory 62 that is communicatively connected to the at least one processor 61. Figure 5 A processor 61 is shown in the figure, and the memory 62 stores instructions that can be executed by the at least one processor 61. The instructions are executed by the at least one processor 61 so that the at least one processor 61 can perform the steps of the page attribute acquisition method as described above.
[0069] Specifically, the memory 62 in the embodiment of the present invention is a non-volatile computer-readable storage medium, which can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the program instructions / modules corresponding to the page attribute acquisition method in the above-mentioned embodiment of the present application; the processor 61 executes various functional applications and performs data processing by running the non-volatile software programs, instructions and modules stored in the memory 62, that is, implements the page attribute acquisition method described in the above-mentioned method embodiment.
[0070] In some embodiments, the memory 62 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created during the processing of the page attribute acquisition method, etc. In addition, the memory 62 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 non-volatile solid-state storage devices;
[0071] In some embodiments, the memory 62 may optionally include remote memories that are remotely arranged relative to the processor 61. These remote memories may be connected to a computer device that performs domain name filtering processing via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0072] In the embodiment of the present invention, the computer device executing the page attribute acquisition method may further include an input device 63 and an output device 64; wherein the input device 63 may acquire the user's operation information on the computer device, and the output device 64 may include a display device such as a display screen. In the embodiment of the present invention, the processor 61, the memory 62, the input device 63 and the output device 64 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0073] The computer device provided according to the embodiment of the present invention can execute the steps of the page attribute acquisition method in the above embodiment when the processor 61 executes the code in the memory 62, and has the technical effect of the above method embodiment. For technical details not described in detail in this embodiment, please refer to the technical content provided in the method embodiment of this application.
[0074] An embodiment of the present invention also provides a computer-readable storage medium, on which computer-readable instructions are stored. When the computer-readable instructions are executed by at least one processor, the steps of the page attribute acquisition method as described above can be implemented. When the steps of the method are executed, the technical effects of the above-mentioned method embodiment are achieved. For technical details not described in detail in this embodiment, please refer to the technical content provided in the method embodiment of this application.
[0075] The embodiment of the present invention also provides a computer program product, which can execute the page attribute acquisition method provided in the method embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the technical content provided in the method embodiment of the present application.
[0076] It should be noted that the functional modules in the above embodiments of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0077] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or an intelligent terminal device or a processor to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0078] In the above embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation, for example, at least two modules or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0079] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on at least two network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0080] Obviously, the embodiments described above are only some embodiments of the present invention, rather than all embodiments. The preferred embodiments of the present invention are given in the accompanying drawings, but they do not limit the patent scope of the present invention. The present invention can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive. Although the present invention has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific embodiments, or to perform equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of the present invention, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present invention.
Claims
1. A method for obtaining page attributes, used for debugging or testing an application, wherein the page attributes include control attribute information of at least one page control, characterized in that: include: When the application to be debugged or tested is running on the terminal, the user operation in the page displayed on the terminal screen is monitored, and when the user operation is detected, the event generated by the user operation is intercepted, the page control to be triggered by the user operation in the page is determined, and the current working mode of the page is determined; Reading configuration information corresponding to the working mode, and acquiring control attribute information of the page control according to the configuration information, wherein the working mode includes a development mode and a test mode, the development mode corresponds to configuration information during debugging of the application, and the test mode corresponds to configuration information during testing of the application; Extracting a subclass identification parameter from the control attribute information to determine whether the page control contains a sub-control, wherein when the subclass identification parameter is empty, it is determined that there is no sub-control; If the subclass identification parameter is not empty, loop through the parameter values contained in the subclass identification parameter to obtain at least one subcontrol in the page control, and obtain subcontrol information accordingly; wherein the subcontrol information includes the quantity information and type information of the subcontrol, and the control attribute information of the subcontrol itself; Acquire control configuration parameters, create an information display control in the page displayed on the terminal screen according to the control configuration parameters, the created information display control is a floating text box or a floating ball floating on the page, display the control attribute information of the page control and the sub-control through the information display control, and make the page control respond to the user operation to complete the corresponding operation, and acquire the control attribute information of the page control and the sub-control in real time before the information display control is closed, and when the control attribute information of the page control and / or the sub-control changes, update the display in real time on the information display control; The displaying of the control attribute information of the page control and the sub-control by the information display control includes: The control property information of the page control and the sub-control is directly displayed through the floating text box, or a display box pops up when the floating ball is clicked to display the control property information of the page control and the sub-control that are initially in a hidden state.
2. The page attribute acquisition method according to claim 1, characterized in that: Before monitoring the user operation in the page displayed on the terminal screen, the method further includes: Adding a status identifier to the application to which the page belongs, the status identifier being used to configure a current working mode of the page displayed on the terminal screen, wherein the working mode includes a test mode and a development mode; Based on the state identifier, the content categories of the page attributes to be displayed are configured for the test mode and the development mode respectively to obtain the corresponding configuration information.
3. The page attribute acquisition method according to claim 1 or 2, characterized in that: Creating an information display control in a page displayed on the terminal screen includes: At least one first information display control is created for the page control, and at least one second information display control is created for the sub-control.
4. The page attribute acquisition method according to claim 1 or 2, characterized in that: Before displaying the control attribute information through the information display control, the method further includes: Determine the information category included in the control attribute information, and when the control attribute information includes at least two information categories, create at least one information display control for each of the information categories.
5. The page attribute acquisition method according to claim 1 or 2, characterized in that: Before displaying the control attribute information through the information display control, the method further includes: It is determined whether there is content to be processed in the control attribute information. If so, the content to be processed in the control attribute information is processed according to a preset processing rule to obtain processed control attribute information.
6. A page attribute acquisition device, used to implement the page attribute acquisition method according to any one of claims 1 to 5, to acquire control attribute information of at least one page control in a page, characterized in that: The device comprises: A control determination module is used to monitor user operations in a page displayed on a terminal screen, and when a user operation is detected, intercept an event generated by the user operation, determine a page control to be triggered by the user operation in the page, and determine a current working mode of the page; An attribute acquisition module, used for reading configuration information corresponding to the working mode, and acquiring control attribute information of the page control according to the configuration information; The attribute display control module is used to create an information display control in the page displayed on the terminal screen, display the control attribute information through the information display control, and make the page control respond to the user operation to complete the corresponding operation.
7. The device for acquiring page attributes according to claim 6, characterized in that: The device also includes a configuration module, which is used to add a status identifier to the application to which the page belongs, and the status identifier is used to configure the current working mode of the page displayed on the terminal screen, wherein the working mode includes a test mode and a development mode; And it is used to configure the content category of the page attribute that needs to be displayed for the test mode and the development mode respectively based on the state identifier to obtain the corresponding configuration information.
8. A computer device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor. When the instructions are executed by the at least one processor, the at least one processor executes the page attribute acquisition method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by at least one processor, the page attribute acquisition method according to any one of claims 1 to 5 is implemented.
