CN107491377B - Pop-up box processing method, device, terminal, and computer-readable storage medium - Google Patents
Pop-up box processing method, device, terminal, and computer-readable storage medium Download PDFInfo
- Publication number
- CN107491377B CN107491377B CN201710735305.0A CN201710735305A CN107491377B CN 107491377 B CN107491377 B CN 107491377B CN 201710735305 A CN201710735305 A CN 201710735305A CN 107491377 B CN107491377 B CN 107491377B
- Authority
- CN
- China
- Prior art keywords
- layer
- pop
- box
- description information
- processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3089—Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域technical field
本发明属于终端技术领域,尤其涉及一种弹出框处理方法、装置、终端及计算机可读存储介质。The present invention belongs to the technical field of terminals, and in particular, relates to a pop-up frame processing method, device, terminal and computer-readable storage medium.
背景技术Background technique
随着智能手机、平板电脑等移动智能终端的广泛普及,各类终端应用在使用过程中会存在各种弹出框情况,给用户各种提示,比如低电量弹出框、应用权限弹出框等。With the widespread popularity of mobile smart terminals such as smartphones and tablet computers, various terminal applications will have various pop-up boxes during use, giving users various prompts, such as low-battery pop-up boxes and application permission pop-up boxes.
在模拟使用测试过程中,为了模拟用户操作需要对各类应用进行使用,在测试使用过程中此类不知何时弹出的弹出框,将会中断模拟测试操作,影响对应用模拟使用的测试。During the simulated use test, various applications need to be used in order to simulate user operations. Such pop-up boxes that pop up at some unknown time during the test use process will interrupt the simulated test operation and affect the test of the simulated use of the application.
发明内容SUMMARY OF THE INVENTION
本发明提供一种弹出框处理方法、装置、终端及计算机可读存储介质,用以解决中断模拟测试操作,影响对应用模拟使用的测试的问题。The present invention provides a pop-up box processing method, device, terminal and computer-readable storage medium, which are used to solve the problem of interrupting the simulation test operation and affecting the test of application simulation use.
本发明实施例第一方面提供了一种弹出框处理方法,包括:A first aspect of the embodiments of the present invention provides a pop-up frame processing method, including:
当监听到图层绘制事件时,获取绘制的图层的描述信息;When listening to the layer drawing event, obtain the description information of the drawn layer;
根据所述图层的描述信息判断所述绘制的图层是否为弹出框的界面;According to the description information of the layer, determine whether the drawn layer is the interface of the pop-up box;
若是所述弹出框的界面,则获取与所述图层的描述信息对应的处理逻辑;If it is the interface of the pop-up box, obtain the processing logic corresponding to the description information of the layer;
对所述弹出框执行所述处理逻辑对应的模拟操作。A simulation operation corresponding to the processing logic is performed on the pop-up box.
本发明实施例第二方面提供了一种弹出框处理装置,包括:A second aspect of the embodiments of the present invention provides a pop-up frame processing device, including:
获取模块,用于当监听到图层绘制事件时,获取绘制的图层的描述信息;The acquisition module is used to acquire the description information of the drawn layer when listening to the layer drawing event;
判断模块,用于根据所述图层的描述信息判断所述绘制的图层是否为弹出框的界面;a judgment module, configured to judge whether the drawn layer is an interface of a pop-up box according to the description information of the layer;
所述获取模块,还用于若是所述弹出框的界面,则获取与所述图层的描述信息对应的处理逻辑;The obtaining module is further configured to obtain the processing logic corresponding to the description information of the layer if the interface of the pop-up box is used;
执行模块,用于对所述弹出框执行所述处理逻辑对应的模拟操作。An execution module, configured to execute a simulation operation corresponding to the processing logic to the pop-up box.
本发明实施例第三方面提供了一种终端,包括:A third aspect of the embodiments of the present invention provides a terminal, including:
存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现本发明实施例第一方面提供的弹出框处理方法。A memory, a processor, and a computer program stored in the memory and running on the processor are characterized in that, when the processor executes the program, the method for processing a popup box provided in the first aspect of the embodiment of the present invention is implemented.
本发明实施例第四方面提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现本发明实施例第一方面提供的弹出框处理方法。A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the pop-up box processing method provided in the first aspect of the embodiments of the present invention.
从上述本发明实施例可知,本发明提供的弹出框处理方法、装置、终端及存储介质,在对应用的模拟测试过程中,终端监听图层绘制,根据绘制的图层的描述信息判断是否在绘制弹出框的界面,若是,则根据该图层的描述信息获取处理该弹出框的处理逻辑,并对该弹出框自动执行该处理逻辑对应的模拟操作,可避免需人工确认方可执行该弹出框所需的操作,使得模拟测试不因弹出框而中断,提高模拟测试的流畅度。It can be seen from the above embodiments of the present invention that in the pop-up box processing method, device, terminal and storage medium provided by the present invention, during the simulation test of the application, the terminal monitors the drawing of the layer, and judges whether it is in the drawing according to the description information of the drawn layer. Draw the interface of the pop-up box, if so, obtain the processing logic for processing the pop-up box according to the description information of the layer, and automatically execute the simulation operation corresponding to the processing logic for the pop-up box, avoiding the need for manual confirmation to execute the pop-up box The operation required by the box makes the simulation test not interrupted by the pop-up box, and improves the fluency of the simulation test.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only are some embodiments of the present invention.
图1是本发明第一实施例提供的弹出框处理方法的流程示意图;1 is a schematic flowchart of a method for processing a popup frame provided by a first embodiment of the present invention;
图2是本发明第二实施例提供的弹出框处理方法的流程示意图;2 is a schematic flowchart of a pop-up frame processing method provided by a second embodiment of the present invention;
图3是本发明第五实施例提供的弹出框处理装置的结构示意图;3 is a schematic structural diagram of a pop-up frame processing apparatus provided by a fifth embodiment of the present invention;
图4是本发明第六实施例提供的弹出框处理装置的结构示意图;4 is a schematic structural diagram of a pop-up frame processing apparatus provided by a sixth embodiment of the present invention;
图5示出了一种终端的硬件结构图。FIG. 5 shows a hardware structure diagram of a terminal.
具体实施方式Detailed ways
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而非全部实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. The embodiments described above are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present invention.
本发明实施例提供的弹出框处理方法,适用于模拟用户测试应用(APPLICATION)的场景中,该应用内置于终端中。在模拟测试中,终端监控系统的图层绘制,如果发现绘制了弹出框对应的图层,则发出广播,预设的处理进程在捕获到该广播时,根据该广播中的图层信息,获取处理弹出框的逻辑,图层的描述信息对应的处理逻辑,并对该弹出框执行该处理逻辑对应的模拟操作,使得在模拟测试过程中自动对该弹出框进行处理,避免其弹出后须人工选择处理逻辑而影响模拟测试的连续性。The pop-up box processing method provided by the embodiment of the present invention is suitable for a scenario of simulating a user testing application (APPLICATION), and the application is built in a terminal. In the simulation test, the layer drawing of the terminal monitoring system, if it is found that the layer corresponding to the pop-up box is drawn, a broadcast is sent. Process the logic of the pop-up box, the processing logic corresponding to the description information of the layer, and perform the simulation operation corresponding to the processing logic for the pop-up box, so that the pop-up box is automatically processed during the simulation test process, avoiding the need for manual operations after it pops up The choice of processing logic affects the continuity of the mock test.
终端是指包括手机、PDA(PERSONAL DIGITAL ASSISTANT)、笔记本电脑、PC(PERSONAL COMPUTE)机等电子设备。Terminal refers to electronic equipment including mobile phone, PDA (PERSONAL DIGITAL ASSISTANT), notebook computer, PC (PERSONAL COMPUTE) machine and so on.
请参阅图1,图1为本发明第一实施例提供的弹出框处理方法的实现流程示意图,该方法可应用于终端中,包括以下步骤:Please refer to FIG. 1. FIG. 1 is a schematic flowchart of the implementation of the pop-up frame processing method provided by the first embodiment of the present invention. The method can be applied to a terminal and includes the following steps:
S101、当监听到图层绘制事件时,获取绘制的图层的描述信息;S101. When a layer drawing event is monitored, obtain description information of the drawn layer;
在对应用的模拟测试过程中,终端中的监听模块监听图层绘制事件,在监听时获取绘制的图层的描述信息。During the simulation test of the application, the monitoring module in the terminal monitors the layer drawing event, and obtains the description information of the drawn layer during monitoring.
图层的描述信息是描述图层基本属性的信息,可包括图层的标识信息、图层的类型、层级以及焦点属性。The description information of the layer is the information describing the basic properties of the layer, which can include the identification information of the layer, the type, level, and focus properties of the layer.
图层的标识信息具有唯一性,每一个图层具有唯一的标识信息,该标识信息如图层的ID(IDENTITY)。The identification information of the layer is unique, and each layer has unique identification information, such as the ID (IDENTITY) of the layer.
图层的类型可识别该图层输出的方式。例如,图层的类型为Popup View,则表示该图层为弹出框。The type of a layer identifies how the layer is output. For example, if the layer type is Popup View, it means that the layer is a popup box.
图层的层级是指图层与其他图层的位置关系。The level of a layer refers to the positional relationship between a layer and other layers.
焦点属性是指图层是否获得焦点。The focus property refers to whether the layer gets the focus.
焦点属性需在系统中进行设置,设置为自动获得焦点,获得焦点的图层可以被用户操作。The focus property needs to be set in the system, and it is set to automatically get the focus, and the layer that gets the focus can be operated by the user.
S102、根据该图层的描述信息判断该绘制的图层是否为弹出框的界面;S102, according to the description information of the layer, determine whether the drawn layer is the interface of the pop-up box;
弹出框的界面对应的图层有固定的特性,根据该图层的描述信息,可以判断当前正在绘制的图层是否为弹出框的界面。The layer corresponding to the interface of the pop-up box has fixed characteristics. According to the description information of the layer, it can be judged whether the layer currently being drawn is the interface of the pop-up box.
S103、若是该弹出框的界面,则获取与该图层的描述信息对应的处理逻辑;S103, if it is the interface of the pop-up box, obtain the processing logic corresponding to the description information of the layer;
若当前绘制的图层是弹出框的界面,根据该图层的描述信息获取处理该弹出框的处理逻辑。If the currently drawn layer is the interface of the pop-up box, the processing logic for processing the pop-up box is obtained according to the description information of the layer.
S104、对该弹出框执行该处理逻辑对应的模拟操作。S104. Perform a simulation operation corresponding to the processing logic to the pop-up box.
按照该处理逻辑处理该弹出框,执行对该弹出框的模拟操作,可跳过需要用户确认的步骤,使得模拟测试得以继续进行。The pop-up box is processed according to the processing logic, and the simulation operation of the pop-up box is performed, and the steps requiring user confirmation can be skipped, so that the simulation test can continue.
本发明实施例中,在对应用的模拟测试过程中,终端监听图层绘制,根据绘制的图层的描述信息判断是否在绘制弹出框的界面,若是,则根据该图层的描述信息获取处理该弹出框的处理逻辑,并对该弹出框自动执行该处理逻辑对应的模拟操作,可避免需人工确认方可执行该弹出框所需的操作,使得模拟测试不因弹出框而中断,提高模拟测试的流畅度。In the embodiment of the present invention, during the simulation test of the application, the terminal monitors the drawing of the layer, and judges whether the interface of the pop-up box is being drawn according to the description information of the drawn layer, and if so, obtains and processes according to the description information of the layer. The processing logic of the pop-up box, and the simulation operation corresponding to the processing logic is automatically performed on the pop-up box, which can avoid the need for manual confirmation to perform the operations required by the pop-up box, so that the simulation test is not interrupted by the pop-up box, and the simulation is improved. Fluency of the test.
请参阅图2,图2为本发明第二实施例中的弹出框处理方法的流程示意图,该方法可应用在终端中,该方法包括以下步骤:Please refer to FIG. 2. FIG. 2 is a schematic flowchart of a method for processing a popup frame according to a second embodiment of the present invention. The method can be applied to a terminal, and the method includes the following steps:
S201、当监听到图层绘制事件时,获取绘制的图层的描述信息;S201. When a layer drawing event is monitored, obtain description information of the drawn layer;
在对应用的模拟测试中,终端中的监听模块监听图层绘制事件,在监听时获取绘制的图层的描述信息。In the simulation test of the application, the monitoring module in the terminal monitors the layer drawing event, and obtains the description information of the drawn layer during monitoring.
图层的描述信息是描述图层基本属性的信息,可包括图层的标识信息、图层的类型、层级以及焦点属性。The description information of the layer is the information describing the basic properties of the layer, which can include the identification information of the layer, the type, level, and focus properties of the layer.
S202、判断该图层的类型是否为预设类型、该图层的层级是否为最上层以及该图层的焦点属性是否为获得焦点,若该图层的类型为预设类型、该图层的层级为最上层且该图层的焦点属性为获得焦点,则确认该绘制的图层是该弹出框的界面;S202: Determine whether the type of the layer is a preset type, whether the level of the layer is the topmost layer, and whether the focus attribute of the layer is to obtain the focus, if the type of the layer is a preset type, the If the level is the top layer and the focus attribute of the layer is to get the focus, then confirm that the drawn layer is the interface of the pop-up box;
该预设类型是指弹出框对应的图层类型。具体可以是Popup View类型的图层。The preset type refers to the layer type corresponding to the popup box. Specifically, it can be a layer of type Popup View.
当一个图层的类型为预设类型,该图层的层级为最上层,以及,该图层的焦点属性为获得焦点,则确认该绘制的图层是该弹出框的界面。When the type of a layer is the preset type, the level of the layer is the top layer, and the focus attribute of the layer is to get the focus, it is confirmed that the drawn layer is the interface of the popup box.
S203、若是该弹出框的界面,则发送系统广播,以使得预设的处理进程,在捕获到该系统广播时,根据该系统广播中的该图层的描述信息,获取与该图层的描述信息对应的处理逻辑;S203, if it is the interface of the pop-up box, send a system broadcast, so that the preset processing process, when the system broadcast is captured, obtains the description of the layer according to the description information of the layer in the system broadcast The processing logic corresponding to the information;
终端发送系统广播,在该广播中携带该图层的描述信息,即,携带该图层的ID、类型、层级以及焦点属性的相关信息。The terminal sends a system broadcast, and the broadcast carries the description information of the layer, that is, carries the relevant information of the ID, type, level, and focus attribute of the layer.
预设的处理进程,即在系统中设置一个应用程序在运行时捕获该系统广播,根据该系统广播中的该图层的描述信息,获取与该图层的描述信息对应的处理逻辑。The preset processing process is to set an application program in the system to capture the system broadcast when running, and obtain processing logic corresponding to the layer description information according to the description information of the layer in the system broadcast.
处理逻辑是指对该弹出框的处理方式,即如何处理该对话框。Processing logic refers to the processing method of the pop-up box, that is, how to process the dialog box.
该图层的描述信息包括图层的标识信息,该标识信息具有唯一性。获取与该图层的描述信息对应的处理逻辑具体为,根据图层标识信息可确认具体的图层,在预设的图层标识信息与处理关键字段的对应关系中,查找与该图层对应的处理关键字段,该处理关键字段为文本信息,含义为处理该图层对应的弹出框的方式,该处理关键字段可包括“允许”、“拒绝”“下一步”“取消”等,根据查找到的该对应的处理关键字段,确定该处理逻辑。The description information of the layer includes the identification information of the layer, and the identification information is unique. The processing logic for obtaining the description information corresponding to the layer is as follows: according to the layer identification information, the specific layer can be confirmed, and in the preset correspondence between the layer identification information and the processing key fields, find the corresponding relationship with the layer. The corresponding processing key field, the processing key field is text information, which means the method of processing the pop-up box corresponding to the layer, and the processing key field can include "Allow", "Reject", "Next", "Cancel" and so on, the processing logic is determined according to the found corresponding processing key field.
进一步地,当获取到与该图层的处理逻辑之后,可判断绘制图层的图层绘制进程是否完成了对该图层的绘制,若未完成该图层的绘制,则指令该图层绘制进程停止绘制该图层,若完成该图层的绘制,则取消输出该图层。Further, after obtaining the processing logic of the layer, it can be judged whether the layer drawing process of the drawing layer has completed the drawing of the layer, and if the drawing of the layer has not been completed, the drawing of the layer is instructed. The process stops drawing the layer, and if the drawing of the layer is completed, the output of the layer is canceled.
该弹出框可以不显示,以使模拟测试流程更顺畅,因此,在获得了对图层的处理逻辑后,便可判断该图层是否绘制完成,未完成则停止绘图,完成了取消输出,可以降低系统的消耗,提高系统流程度,使得模拟测试顺畅度更好。The pop-up box may not be displayed to make the simulation test process smoother. Therefore, after obtaining the processing logic of the layer, it can be judged whether the drawing of the layer is completed. If it is not completed, the drawing will be stopped. Reduce the consumption of the system, improve the degree of system flow, and make the simulation test smoother.
需要说明的是,该弹出框也可以显示,使得模拟测试更接近在用户操作下的真实场景,提高模拟测试的准确度。It should be noted that the pop-up box can also be displayed, so that the simulation test is closer to the real scene under the user's operation, and the accuracy of the simulation test is improved.
S204、通过该预设的处理进程,对该弹出框中处理逻辑对应的按钮控件,执行模拟点击操作。S204. Through the preset processing process, perform a simulated click operation on the button control corresponding to the processing logic in the pop-up box.
通过该预设的处理进程对该弹出框执行该处理逻辑对应的模拟操作。A simulation operation corresponding to the processing logic is performed on the pop-up box through the preset processing process.
若该处理关键字段为“允许”,则对该弹出框中的对应“允许”的按钮控件模拟点击操作,从而继续执行该弹出框对应的“允许”之后的流程。If the processing key field is "Allow", a click operation is simulated on the button control corresponding to "Allow" in the pop-up box, so as to continue the process after "Allow" corresponding to the pop-up box.
若该处理关键字段为“取消”,则对该弹出框中的对应“取消”的按钮控件模拟点击操作,从而继续执行该弹出框对应的“取消”之后的流程。If the processing key field is "Cancel", a click operation is simulated on the button control corresponding to "Cancel" in the pop-up box, so as to continue the process after the "Cancel" corresponding to the pop-up box.
通过该预设的处理进程处理该弹出框,可跳过需要用户确认的步骤,使得模拟测试得以继续进行。By processing the pop-up box through the preset processing process, steps requiring user confirmation can be skipped, so that the simulation test can continue.
本发明实施例中,在对应用的模拟测试过程中,终端监听图层绘制,根据绘制的图层的描述信息判断是否在绘制弹出框的界面,若是,则根据该图层的描述信息获取处理该弹出框的处理逻辑,并对该弹出框自动执行该处理逻辑对应的模拟操作,可避免需人工确认方可执行该弹出框所需的操作,使得模拟测试不因弹出框而中断,提高模拟测试的流畅度。In the embodiment of the present invention, during the simulation test of the application, the terminal monitors the drawing of the layer, and judges whether the interface of the pop-up box is being drawn according to the description information of the drawn layer, and if so, obtains and processes according to the description information of the layer. The processing logic of the pop-up box, and the simulation operation corresponding to the processing logic is automatically performed on the pop-up box, which can avoid the need for manual confirmation to perform the operations required by the pop-up box, so that the simulation test is not interrupted by the pop-up box, and the simulation is improved. Fluency of the test.
请参见图3,图3为本发明第三实施例中弹出框处理装置的结构示意图,该弹出框处理装置可内置于终端中,用于执行上述图1、图2所示实施例中的弹出框处理方法,该弹出框处理装置包括:获取模块301、判断模块302和执行模块303。Please refer to FIG. 3 . FIG. 3 is a schematic structural diagram of a pop-up box processing device in a third embodiment of the present invention. The pop-up box processing device can be built in a terminal and used to execute the pop-up box in the embodiments shown in FIG. 1 and FIG. 2 . A frame processing method, the pop-up frame processing apparatus includes: an
获取模块301,用于当监听到图层绘制事件时,获取绘制的图层的描述信息;An
在对应用的模拟测试过程中,终端中的监听模块监听图层绘制事件,在监听时获取绘制的图层的描述信息。During the simulation test of the application, the monitoring module in the terminal monitors the layer drawing event, and obtains the description information of the drawn layer during monitoring.
图层的描述信息是描述图层基本属性的信息,可包括图层的标识信息、图层的类型、层级以及焦点属性。The description information of the layer is the information describing the basic properties of the layer, which can include the identification information of the layer, the type, level, and focus properties of the layer.
图层的标识信息具有唯一性,每一个图层具有唯一的标识信息,该标识信息如图层的ID。The identification information of the layer is unique, and each layer has unique identification information, such as the ID of the layer.
图层的类型可识别该图层输出的方式。例如,图层的类型为Popup View,则表示该图层为弹出框。The type of a layer identifies how the layer is output. For example, if the layer type is Popup View, it means that the layer is a popup box.
图层的层级是指图层与其他图层的位置关系。The level of a layer refers to the positional relationship between a layer and other layers.
焦点属性是指图层是否获得焦点。The focus property refers to whether the layer gets the focus.
焦点属性需在系统中进行设置,设置为自动获得焦点,获得焦点的图层可以被用户操作。The focus property needs to be set in the system, and it is set to automatically get the focus, and the layer that gets the focus can be operated by the user.
判断模块302,用于根据该图层的描述信息判断该绘制的图层是否为弹出框的界面;The
获取模块301,还用于若是该弹出框的界面,则获取与该图层的描述信息对应的处理逻辑;The obtaining
执行模块303,用于对该弹出框执行该处理逻辑对应的模拟操作。The
本实施例未尽之细节,请参阅前述图1、图2所示实施例的描述,此处不再赘述。For details that are not exhausted in this embodiment, please refer to the descriptions of the embodiments shown in FIG. 1 and FIG. 2 above, which will not be repeated here.
本发明实施例中,在对应用的模拟测试过程中,终端监听图层绘制,根据绘制的图层的描述信息判断是否在绘制弹出框的界面,若是,则根据该图层的描述信息获取处理该弹出框的处理逻辑,并对该弹出框自动执行该处理逻辑对应的模拟操作,可避免需人工确认方可执行该弹出框所需的操作,使得模拟测试不因弹出框而中断,提高模拟测试的流畅度。In the embodiment of the present invention, during the simulation test of the application, the terminal monitors the drawing of the layer, and judges whether the interface of the pop-up box is being drawn according to the description information of the drawn layer, and if so, obtains and processes according to the description information of the layer. The processing logic of the pop-up box, and the simulation operation corresponding to the processing logic is automatically performed on the pop-up box, which can avoid the need for manual confirmation to perform the operations required by the pop-up box, so that the simulation test is not interrupted by the pop-up box, and the simulation is improved. Fluency of the test.
请参见图4,图4为本发明第四实施例中弹出框处理装置的结构示意图,该弹出框处理装置可内置于终端,用于执行上述图1~图2所示实施例中的弹出框处理方法,该弹出框处理装置与图3所示装置的不同之处在于:Please refer to FIG. 4. FIG. 4 is a schematic structural diagram of a pop-up frame processing apparatus in a fourth embodiment of the present invention. The pop-up frame processing apparatus can be built in a terminal and used to execute the pop-up frame in the embodiments shown in FIG. 1 to FIG. 2. Processing method, the difference between the pop-up box processing device and the device shown in FIG. 3 is:
获取模块301,具体用于若是该弹出框的界面,则发送系统广播,以使得预设的处理进程,在捕获到该系统广播时,根据该系统广播中的该图层的描述信息,获取与该图层的描述信息对应的处理逻辑。The
预设的处理进程,即在系统中设置一个应用程序在运行时捕获该系统广播,根据该系统广播中的该图层的描述信息,获取与该图层的描述信息对应的处理逻辑。The preset processing process is to set an application program in the system to capture the system broadcast when running, and obtain processing logic corresponding to the layer description information according to the description information of the layer in the system broadcast.
处理逻辑是指对该弹出框的处理方式,即如何处理该对话框。Processing logic refers to the processing method of the pop-up box, that is, how to process the dialog box.
该图层的描述信息包括图层的标识信息,还包括该图层的类型、层级以及焦点属性。The description information of the layer includes the identification information of the layer, and also includes the type, level and focus attribute of the layer.
获取模块301包括:The
查找子模块3011,用于根据该图层的标识信息,在预设的图层的标识信息与处理关键字段的对应关系中,查找与该图层对应的处理关键字段;The
该处理关键字段为文本信息,含义为处理该图层对应的弹出框的方式,该处理关键字段可包括“允许”、“拒绝”“下一步”“取消”等。The processing key field is text information, which means the method of processing the pop-up box corresponding to the layer, and the processing key field may include "allow", "reject", "next", "cancel" and so on.
确定子模块3012,用于根据该对应的处理关键字段确定该处理逻辑。The determination sub-module 3012 is configured to determine the processing logic according to the corresponding processing key field.
判断模块302包括:The
判断子模块3021,用于判断该图层的类型是否为预设类型、该图层的层级是否为最上层以及该图层的焦点属性是否为获得焦点;Judging sub-module 3021, for judging whether the type of the layer is a preset type, whether the level of the layer is the top layer and whether the focus attribute of the layer is to obtain the focus;
确认子模块3022,用于若该图层的类型为预设类型、该图层的层级为最上层且该图层的焦点属性为获得焦点,则确认该绘制的图层是该弹出框的界面。
该预设类型是指弹出框对应的图层类型。具体可以是Popup View类型的图层。The preset type refers to the layer type corresponding to the popup box. Specifically, it can be a layer of type Popup View.
进一步地,执行模块303,还用于通过该预设的处理进程,对该弹出框中该处理逻辑对应的按钮控件,执行模拟点击操作;Further, the
例如,若该处理关键字段为“允许”,则对该弹出框中的对应“允许”的按钮控件模拟点击操作,从而继续执行该弹出框对应的“允许”之后的流程。For example, if the processing key field is "Allow", a click operation is simulated on the button control corresponding to "Allow" in the pop-up box, so as to continue the process after "Allow" corresponding to the pop-up box.
若该处理关键字段为“取消”,则对该弹出框中的对应“取消”的按钮控件模拟点击操作,从而继续执行该弹出框对应的“取消”之后的流程。If the processing key field is "Cancel", a click operation is simulated on the button control corresponding to "Cancel" in the pop-up box, so as to continue the process after the "Cancel" corresponding to the pop-up box.
通过该预设的处理进程处理该弹出框,可跳过需要用户确认的步骤,使得模拟测试得以继续进行。By processing the pop-up box through the preset processing process, steps requiring user confirmation can be skipped, so that the simulation test can continue.
判断模块302,还用于判断图层绘制进程是否完成该图层的绘制;The judging
该装置还可以进一步包括:The device may further include:
处理模块401,用于若未完成该图层的绘制,则指令该图层绘制进程停止绘制操作;若完成该图层的绘制,则取消输出该图层。The
该弹出框可以不显示,以使模拟测试流程更顺畅,因此,在获得了对图层的处理逻辑后,便可判断该图层是否绘制完成,未完成则停止绘图,完成了取消输出,可以降低系统的消耗,提高系统流程度,使得模拟测试顺畅度更好。The pop-up box may not be displayed to make the simulation test process smoother. Therefore, after obtaining the processing logic of the layer, it can be judged whether the drawing of the layer is completed. If it is not completed, the drawing will be stopped. Reduce the consumption of the system, improve the degree of system flow, and make the simulation test smoother.
本实施例未尽之细节,请参阅前述图1至图3所示实施例的描述,此处不再赘述。For details that are not exhausted in this embodiment, please refer to the descriptions of the embodiments shown in FIG. 1 to FIG. 3 above, which will not be repeated here.
本发明实施例中,在对应用的模拟测试过程中,终端监听图层绘制,根据绘制的图层的描述信息判断是否在绘制弹出框的界面,若是,则根据该图层的描述信息获取处理该弹出框的处理逻辑,并对该弹出框自动执行该处理逻辑对应的模拟操作,可避免需人工确认方可执行该弹出框所需的操作,使得模拟测试不因弹出框而中断,提高模拟测试的流畅度。In the embodiment of the present invention, during the simulation test of the application, the terminal monitors the drawing of the layer, and judges whether the interface of the pop-up box is being drawn according to the description information of the drawn layer, and if so, obtains and processes according to the description information of the layer. The processing logic of the pop-up box, and the simulation operation corresponding to the processing logic is automatically performed on the pop-up box, which can avoid the need for manual confirmation to perform the operations required by the pop-up box, so that the simulation test is not interrupted by the pop-up box, and the simulation is improved. Fluency of the test.
请参阅图5,图5为本发明实施例提供的终端硬件结构示意图。Please refer to FIG. 5. FIG. 5 is a schematic structural diagram of a terminal hardware provided by an embodiment of the present invention.
本实施例中所描述的终端,包括:The terminal described in this embodiment includes:
存储器51、处理器52及存储在存储器51上并可在处理器上运行的计算机程序,处理器执行所述程序时实现前述图1~图2所示实施例中描述的弹出框处理方法。The
进一步地,该终端还包括:Further, the terminal also includes:
至少一个输入设备53;至少一个输出设备54。At least one
上述存储器51、处理器52输入设备53和输出设备54通过总线55连接。The above-mentioned
其中,输入设备53具体可为摄像头、触控面板、物理按键或者鼠标等等。输出设备54具体可为显示屏。The
存储器51可以是高速随机存取记忆体(RAM,Random Access Memory)存储器,也可为非不稳定的存储器(non-volatile memory),例如磁盘存储器。存储器51用于存储一组可执行程序代码,处理器52与存储器51耦合。The
进一步地,本发明实施例还提供了一种计算机可读存储介质,该计算机可读存储介质可以是设置于上述各实施例中的终端中,该计算机可读存储介质可以是前述图5所示实施例中的存储器。该计算机可读存储介质上存储有计算机程序,该程序被处理器执行时实现前述图1~图2所示实施例中描述的弹出框处理方法。进一步地,该计算机可存储介质还可以是U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。Further, an embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium may be provided in the terminal in the above-mentioned embodiments, and the computer-readable storage medium may be the one shown in FIG. 5 . memory in an embodiment. A computer program is stored on the computer-readable storage medium, and when the program is executed by the processor, the pop-up box processing method described in the embodiments shown in the foregoing FIG. 1 to FIG. 2 is implemented. Further, the computer-storable medium can also be a USB flash drive, a removable hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, etc. medium of program code.
需要说明的是,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It should be noted that each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically alone, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules.
所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来。If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or in part that contributes to the prior art, or all or part of the technical solutions.
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本发明所必须的。It should be noted that, for the convenience of description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. As in accordance with the present invention, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily all necessary to the present invention.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
以上为对本发明所提供的弹出框处理方法、装置、终端和计算机可读存储介质的描述,对于本领域的技术人员,依据本发明实施例的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本发明的限制。The above is a description of the pop-up box processing method, device, terminal, and computer-readable storage medium provided by the present invention. For those skilled in the art, according to the idea of the embodiment of the present invention, there will be a specific implementation and application scope. Changes, in conclusion, the content of this specification should not be construed as a limitation to the present invention.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710735305.0A CN107491377B (en) | 2017-08-24 | 2017-08-24 | Pop-up box processing method, device, terminal, and computer-readable storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710735305.0A CN107491377B (en) | 2017-08-24 | 2017-08-24 | Pop-up box processing method, device, terminal, and computer-readable storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107491377A CN107491377A (en) | 2017-12-19 |
| CN107491377B true CN107491377B (en) | 2020-11-20 |
Family
ID=60650914
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710735305.0A Active CN107491377B (en) | 2017-08-24 | 2017-08-24 | Pop-up box processing method, device, terminal, and computer-readable storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107491377B (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104484273A (en) * | 2014-12-19 | 2015-04-01 | 广州博冠信息科技有限公司 | Test method for application program, device and system |
| CN105159545A (en) * | 2015-09-30 | 2015-12-16 | 北京奇虎科技有限公司 | Method and device for processing popup box on intelligent terminal for test |
| CN105573911A (en) * | 2015-12-10 | 2016-05-11 | 北京奇虎科技有限公司 | Application popup window processing method and apparatus |
| CN105786687A (en) * | 2014-12-22 | 2016-07-20 | 博雅网络游戏开发(深圳)有限公司 | Mobile application test method and device |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7376696B2 (en) * | 2002-08-27 | 2008-05-20 | Intel Corporation | User interface to facilitate exchanging files among processor-based devices |
| US7334219B2 (en) * | 2002-09-30 | 2008-02-19 | Ensco, Inc. | Method and system for object level software testing |
| US7624375B2 (en) * | 2003-06-12 | 2009-11-24 | National Instruments Corporation | Automatically configuring a graphical user interface element to bind to a graphical program |
-
2017
- 2017-08-24 CN CN201710735305.0A patent/CN107491377B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104484273A (en) * | 2014-12-19 | 2015-04-01 | 广州博冠信息科技有限公司 | Test method for application program, device and system |
| CN105786687A (en) * | 2014-12-22 | 2016-07-20 | 博雅网络游戏开发(深圳)有限公司 | Mobile application test method and device |
| CN105159545A (en) * | 2015-09-30 | 2015-12-16 | 北京奇虎科技有限公司 | Method and device for processing popup box on intelligent terminal for test |
| CN105573911A (en) * | 2015-12-10 | 2016-05-11 | 北京奇虎科技有限公司 | Application popup window processing method and apparatus |
Non-Patent Citations (1)
| Title |
|---|
| android开发popupwindow判断是否弹出;forevrehailong;《https://blog.csdn.net/forevrehailong/article/details/77162614》;20170814;第1页 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107491377A (en) | 2017-12-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104899046B (en) | A kind of multi-functional script operation method and system | |
| CN105224216B (en) | A kind of user terminal control method and user terminal | |
| CN107807841B (en) | Server simulation method, device, equipment and readable storage medium | |
| CN104699408A (en) | Touch screen operation method, device and touch device | |
| CN107885823A (en) | Player method, device, storage medium and the electronic equipment of audio-frequency information | |
| CN105278863A (en) | Method, device and mobile terminal for preventing misoperation by using time interval detection | |
| CN112286485A (en) | Method and device for controlling application through voice, electronic equipment and storage medium | |
| CN110174946A (en) | Mouse action analogy method, simulation system, storage medium and electronic equipment | |
| CN105068718A (en) | Information processing method and electronic device | |
| CN111949510B (en) | Test processing method, device, electronic equipment and readable storage medium | |
| CN114265777B (en) | Application program testing method and device, electronic equipment and storage medium | |
| CN108668160B (en) | Rhythm barrage display method, device and electronic device | |
| CN107272989B (en) | Using starting method, apparatus and terminal device | |
| CN107491377B (en) | Pop-up box processing method, device, terminal, and computer-readable storage medium | |
| CN111414073A (en) | A human-computer interaction method, device, electronic device and readable storage medium | |
| CN107544727A (en) | Cursor positioning method and system, readable storage medium and computer equipment | |
| CN109492249B (en) | Rapid generation method and device of design drawing and terminal equipment | |
| CN103729132B (en) | A character input method, device, virtual keyboard and electronic equipment | |
| CN114564133B (en) | Application display method, device, equipment and medium | |
| CN116431461A (en) | Desktop application testing method, device, electronic equipment and program product | |
| WO2017219525A1 (en) | Interface display method and terminal | |
| CN111124579A (en) | Special effect rendering method and device, electronic equipment and storage medium | |
| CN114511535B (en) | White screen detection method and device, electronic equipment, medium and product | |
| CN105227980A (en) | A kind of input method of TV browser, Apparatus and system | |
| CN114237479B (en) | Control method and device of application program and electronic equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
| GR01 | Patent grant | ||
| GR01 | Patent grant |