CN110704320A - Control operation method and device - Google Patents

Control operation method and device Download PDF

Info

Publication number
CN110704320A
CN110704320A CN201910931002.5A CN201910931002A CN110704320A CN 110704320 A CN110704320 A CN 110704320A CN 201910931002 A CN201910931002 A CN 201910931002A CN 110704320 A CN110704320 A CN 110704320A
Authority
CN
China
Prior art keywords
control
target
target control
auxiliary
found
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.)
Pending
Application number
CN201910931002.5A
Other languages
Chinese (zh)
Inventor
金伟光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN201910931002.5A priority Critical patent/CN110704320A/en
Publication of CN110704320A publication Critical patent/CN110704320A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present disclosure provides a control operation method, including: searching a target control to be operated aiming at a user interface; if the target control cannot be found, searching an auxiliary control associated with the target control in the user interface; if the auxiliary control associated with the target control is found, positioning the target control by using the found auxiliary control; and performing a correlation operation on the positioning area. The present disclosure provides a control operating device, a computer system, and a computer-readable storage medium.

Description

Control operation method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a control operation method and apparatus.
Background
Before an application is delivered for use, the performance of the application is typically checked by application testing. When the application test is carried out, the tested application can be operated under the specified conditions by using the test tool according to the test case so as to find the application error, measure the application quality and evaluate whether the application can meet the design requirement.
In the process of implementing the invention, the inventor finds that when the mobile terminal App carries out the automatic test at present, since verification is usually required for various mobile terminals such as mobile phones of different brands, different system versions and different sizes, developers usually modify codes for different mobile terminals when carrying out adaptation. In this case, even the ID (identification) may be different if the development of the unnormal is likely to cause the same control to appear as a different class on different terminals. This necessarily increases the difficulty of manipulating the controls during automated testing.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide a control operation method and a control operation apparatus capable of operating a control more accurately.
One aspect of the embodiments of the present disclosure provides a control operating method, including: searching a target control to be operated aiming at a user interface; if the target control cannot be found, searching an auxiliary control associated with the target control in the user interface; if the auxiliary control related to the target control is found, positioning the target control by using the found auxiliary control; and performing a correlation operation on the positioning area.
According to an embodiment of the present disclosure, the method further includes: configuring one device of the at least one electronic device as a master device and configuring the rest devices of the at least one electronic device as slave devices; and the target application execution control instruction after the remote control code is updated comprises: generating a first control instruction for performing remote control on a first application, wherein the first application is a target application running in the main device, and the first control instruction corresponds to a first user operation; sending the first control instruction to the main device so that the first application executes the first control instruction; and controlling the slave device to generate and execute a second control instruction for remotely controlling a second application, wherein the second application is a target application running in the slave device, and the second control instruction is generated by simulating a user to execute the first user operation on the second application.
According to an embodiment of the present disclosure, the positioning the target control by using the found auxiliary control includes: acquiring first control information and a first relative position, wherein the first control information is control information of the found auxiliary control, and the first relative position is a relative position between the found auxiliary control and the target control; and positioning the target control according to the first control information and the first relative position.
According to an embodiment of the present disclosure, the positioning the target control by using the found auxiliary control includes: finding out a first control and a second control from the found auxiliary controls; positioning the target control by using the first control to obtain a first area; positioning the target control by using the second control to obtain a second area; and setting the first area and the second area as the positioning area in response to the first area and the second area being identical.
According to an embodiment of the present disclosure, the positioning the target control by using the found auxiliary control further includes: in response to the first area and the second area not being consistent, finding a third control from the found auxiliary controls; and utilizing the first control and the third control to continue positioning the target control.
According to an embodiment of the present disclosure, the method further includes: searching N controls which are closest to the target control according to the control tree corresponding to the user interface; and taking the N controls as auxiliary controls associated with the target control in the user interface.
According to an embodiment of the present disclosure, the method further includes: searching brother nodes of target nodes aiming at a control tree corresponding to the user interface, wherein the target nodes correspond to the target controls; and taking the control corresponding to the brother node as an auxiliary control associated with the target control in the user interface.
According to an embodiment of the present disclosure, the method further includes: storing second control information and a second relative position in a configuration file of a test script, wherein the second control information is control information of an auxiliary control associated with the target control in the user interface; the second relative position is a relative position between the auxiliary control associated with the target control and the target control in the user interface.
Another aspect of the embodiments of the present disclosure provides a control operating device, including: the first searching module is used for searching a target control to be operated aiming at a user interface; the second searching module is used for searching an auxiliary control related to the target control in the user interface under the condition that the target control cannot be found; the positioning module is used for positioning the target control by using the found auxiliary control under the condition that the auxiliary control associated with the target control is found; and the operation module is used for executing relevant operations on the positioning area.
Another aspect of an embodiment of the present disclosure provides a computer system, including: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the methods of embodiments of the present disclosure.
Another aspect of the disclosed embodiments provides a computer-readable storage medium storing computer-executable instructions that, when executed, implement a method of the disclosed embodiments.
Another aspect of the disclosed embodiments provides a computer program comprising computer executable instructions that when executed perform the method of the disclosed embodiments.
According to the embodiment of the disclosure, because a technical means of positioning a target control by referring to the auxiliary control is adopted, the technical problem that the control is difficult to accurately operate in the automatic test due to different representations of the target control on different terminals in the related technology is at least partially solved, and the technical effect of accurately operating the control in the automatic test is further achieved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an exemplary system architecture to which the control operation methods and apparatus of embodiments of the present disclosure may be applied;
FIG. 2 schematically illustrates an application scenario of the control operation method and apparatus according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a control operation method according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a block diagram of a control-operating device according to an embodiment of the present disclosure; and
FIG. 5 schematically illustrates a block diagram of a computer system suitable for implementing the control operation method and apparatus according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). It will be further understood by those within the art that virtually any disjunctive word and/or phrase presenting two or more alternative terms, whether in the description, claims, or drawings, should be understood to contemplate the possibilities of including one of the terms, either of the terms, or both terms. For example, the phrase "a or B" should be understood to include the possibility of "a" or "B", or "a and B".
The embodiment of the disclosure provides a control operation method capable of more accurately operating a control and a control operation device capable of applying the method. The method comprises the step of searching a target control to be operated aiming at a user interface. And if the target control cannot be found, searching an auxiliary control associated with the target control in the user interface. And if the auxiliary control associated with the target control is found, positioning the target control by using the found auxiliary control, and executing the operation related to the test on the positioning area.
Fig. 1 schematically illustrates an exemplary system architecture to which the control operation method and apparatus of the present disclosure may be applied. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired and/or wireless communication links, and so forth.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, and/or social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the control operation method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the control operating device provided by the embodiment of the present disclosure may be generally disposed in the server 105. The control operation method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the control operating device provided by the embodiment of the present disclosure may be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Alternatively, the control operation method provided by the embodiment of the present disclosure may also be executed by the terminal device 101, 102, or 103, or may also be executed by another terminal device different from the terminal device 101, 102, or 103. Accordingly, the control operating device provided in the embodiments of the present disclosure may also be disposed in the terminal device 101, 102, or 103, or in another terminal device different from the terminal device 101, 102, or 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically illustrates an application scenario of the control operation method and apparatus according to the embodiment of the present disclosure.
When the automated test is applied, a control in a user interface generally needs to be tested, and the test control generally needs to perform test-related operations on the control, such as clicking, dragging, sliding and the like. Therefore, if a control behaves differently on different terminals, such as different IDs, it is difficult to find the control during the automated testing, so that it is difficult or even impossible to perform the test-related operation on the control, and the test is difficult to advance.
In order to solve the above problem, an embodiment of the present disclosure provides an improved control operation method. As shown in fig. 2, if the a control needs to be operated during the automated testing, the a control may be searched first. If the A control is found, the A control can be directly operated. If the A control cannot be found, auxiliary controls around the A control, such as B, C, D and finance, insurance, finance and my controls, can be found. If the auxiliary control is found, the A control can be positioned by using the auxiliary control, and then the A control is operated. If the auxiliary control cannot be found, an error can be reported directly and the developer is informed. Through the embodiment of the disclosure, the control to be tested can be positioned more easily, and the control can be operated more accurately.
Fig. 3 schematically illustrates a flowchart of a control operation method according to an embodiment of the present disclosure.
As shown in fig. 3, the method may include operations S301 to S304, for example.
In operation S301, a target control to be operated is searched for a user interface.
It should be noted that the user interface here may be any user interface included in the application to be tested. And each control in each user interface may serve as a target control for embodiments of the present disclosure.
Specifically, when a target control is searched, whether the target control is included in the corresponding user interface may be searched based on the control information. More specifically, the target control can be located by traversing a tree of controls corresponding to the user interface.
It should be noted that, in the embodiment of the present disclosure, the control information may include, but is not limited to, an ID (identification), a class (type), a text (text), an xpath (path), and a position (location), for example. In order to be compatible with different mobile terminals, the same control may be changed on different terminals, for example, the same control may use different control information on different terminals. Therefore, when the control is directly searched based on the control information of a target control, the control may be found, and the control may not be found.
In operation S302, if the target control cannot be found, an auxiliary control associated with the target control in the user interface is found.
In the embodiment of the present disclosure, if the target control is found, the operation related to the test is directly performed on the target control. And if the target control cannot be found, finding an auxiliary control associated with the target control in the user interface.
It should be noted that, in the embodiment of the present disclosure, the method may further include the following operations, for example. And configuring one or more auxiliary controls associated with each target control in advance for each target control, and simultaneously saving the second control information and the second relative position into a configuration file of the test script. And the second control information is control information of an auxiliary control associated with the target control in the user interface. The second relative position is a relative position between an auxiliary control associated with the target control and the target control in the user interface.
Specifically, for each target control, control information of N (N is greater than or equal to 1 and N is an integer) controls around the target control may be collected during the recording process of the test script, and the N controls may be used as auxiliary controls associated with the target control. Meanwhile, the relative position between each control in the N controls and the target control is calculated, and the control information of the auxiliary controls and the relative position information between the auxiliary controls and the target control are stored in a configuration file of the test script. In this way, during the playback process of the test script, the corresponding control information can be read from the configuration file to search for a target control and an auxiliary control associated with the target control.
It should be noted that, in the embodiment of the present disclosure, the method for finding the target control is similar to the method for finding the auxiliary control, and details are not repeated here. And similar to the target control, when an auxiliary control is searched, the auxiliary control may be found, or the auxiliary control may not be found. Thus, to navigate to a target control, optionally, in embodiments of the present disclosure, multiple controls may be selected as secondary controls associated with a target control. For example, the closest few controls to the target control may be used as auxiliary controls associated with the target control, or siblings of the target control may also be used as auxiliary controls associated with the target control.
As an alternative embodiment, for example, the method may further include the following operations. And searching N (N is more than or equal to 1 and is an integer, for example, N is 5) controls which are closest to the target control for the control tree corresponding to the user interface. And taking the N controls as auxiliary controls associated with the target control in the user interface.
Specifically, in the embodiment of the present disclosure, a control tree of one user interface may include information such as a node corresponding to each control, coordinates of an upper left corner of each control, and width and height data. It is therefore possible to traverse the tree of controls and based on this information find the N controls that are closest to a target control. It should be noted that, in the embodiment of the present disclosure, for convenience of calculation, a coordinate origin may also be set. For example, referring back to fig. 2, the coordinates of the upper left corner in the drawing may be defined as the origin coordinates (0, 0), while the coordinates of the lower right corner in the drawing may be defined as (width, height).
As another alternative embodiment, for example, the method may further include the following operations. And searching brother nodes of the target node aiming at the control tree corresponding to the user interface, wherein the target node corresponds to the target control. And taking the control corresponding to the sibling node as an auxiliary control associated with the target control in the user interface.
Specifically, a sibling of a target control in a user interface may be found by traversing a tree of controls of the user interface. It should be noted that, since a node may or may not have a sibling node. Therefore, in the embodiment of the present disclosure, if a node has no sibling node, it may be considered to configure the control corresponding to the other node as the auxiliary control corresponding to the node and associated with the target control.
It should be noted that, in the embodiment of the present disclosure, all controls in one user interface except the target control may also be used as the auxiliary control associated with the target control.
In operation S303, if an auxiliary control associated with the target control is found, the target control is located by using the found auxiliary control.
In the embodiment of the present disclosure, if the auxiliary control is found, the target control is located by using the found auxiliary control. And if the auxiliary control cannot be found, reporting an error and informing a developer.
As an alternative embodiment, the positioning of the target control with the found auxiliary control may include, for example, the following operations. And acquiring first control information and a first relative position, wherein the first control information is the control information of the found auxiliary control, and the first relative position is the relative position between the found auxiliary control and the target control. And positioning the target control according to the first control information and the first relative position.
Specifically, in the playback process of the test script, the first control information and the first relative position may be read from the configuration file of the test script, and the area where the target control is located may be calculated from the read data, so as to position the target control.
It should be noted that, in the embodiment of the present disclosure, when an auxiliary control associated with a target control is searched, the target control may be located under the condition that any one auxiliary control is found, or all auxiliary controls that can be found may be found first and then the target control is located. The former may cause inaccurate positioning of the target control in the case of a change in the auxiliary control unless the target control remains unchanged with respect to the auxiliary control. The latter may or may not be accurate enough depending on the number of secondary controls selected in a position. For example, if only one of the auxiliary controls is used for positioning, the positioning may be inaccurate. And if more than two auxiliary controls are adopted for positioning, the positioning can be more accurate.
As an alternative embodiment, the positioning of the target control with the found auxiliary control may include, for example, the following operations. A first control and a second control are found from the found secondary controls. And positioning the target control by using the first control to obtain a first area. And positioning the target control by using the second control to obtain a second area. It is determined whether the first area and the second area coincide. And if the first area and the second area are consistent, taking the first area and the second area as the positioning area.
Further, as an alternative embodiment, positioning the target control by using the found auxiliary control may further include the following operations, for example. In response to the first region and the second region not being consistent, a third control is found from the found secondary controls. And utilizing the first control and the third control to continue positioning the target control.
In particular, referring back to FIG. 2, when positioning the A control using the auxiliary controls, if the auxiliary controls B, C, D and finance and insurance can be found, then any two auxiliary controls can be found for this positioning. For example, B and C may be selected to locate A. If B and C locate A consistently, then A is considered to be present and the correlation operation can be performed on the locations where B and C are located. If B and C do not agree on the A location, then B and D may continue to be selected for locating A. If B and D do not align A, then A is considered to be not existed, and any other two auxiliary controls are selected continuously to position A until all the found auxiliary controls are exhausted. And if all the found auxiliary controls are exhausted and A is not positioned yet, error reporting is carried out, and developers are informed at the same time.
It should be noted that, in the embodiment of the present disclosure, when the target control is positioned by using two auxiliary controls each time, the positioning result of one of the auxiliary controls may be used to verify the positioning result of the other auxiliary control, so that the target control may be positioned more accurately.
It should be noted that in the embodiment of the present disclosure, more auxiliary controls may be used for positioning at a time. In this case, the positioning results of different auxiliary controls can be verified mutually, so that the target control can be positioned more accurately.
In operation S304, an operation related to the test is performed on the localization area.
Specifically, different operations may be performed for different target controls, for example, operations such as clicking, dragging, and sliding may be performed for characteristics of the controls.
Through the embodiment of the disclosure, compatibility problems in all application automation tests can be solved by one set of test script, and practice proves that the stability of the test script is greatly improved, the control to be operated can be positioned easily and accurately, and the automation rate of the application tests can be improved in different system versions.
Fig. 4 schematically illustrates a block diagram of a control operating device according to an embodiment of the present disclosure.
As shown in fig. 4, the control operating device 400 may include, for example, a first lookup module 401, a second lookup module 402, a positioning module 403, and an operation module 404.
Specifically, the first search module 401 is configured to search for a target control to be operated for a user interface.
The second searching module 402 is configured to search for an auxiliary control associated with the target control in the user interface if the target control cannot be found.
The positioning module 403 is configured to, in a case that an auxiliary control associated with the target control is found, position the target control by using the found auxiliary control.
The operation module 404 is used for performing test-related operations on the positioning area.
As an alternative embodiment, the positioning module may comprise, for example: the device comprises an acquisition unit and a first positioning unit. Specifically, the obtaining unit is configured to obtain first control information and a first relative position, where the first control information is control information of the found auxiliary control, and the first relative position is a relative position between the found auxiliary control and the target control. The first positioning unit is used for positioning the target control according to the first control information and the first relative position.
As an alternative embodiment, the positioning module may comprise, for example: the device comprises a searching unit, a second positioning unit, a third positioning unit, a first determining unit and a second determining unit. Specifically, the finding unit is used for finding out a first control and a second control from the found auxiliary controls. The second positioning unit is used for positioning the target control by using the first control to obtain a first area. The third positioning unit is used for positioning the target control by using the second control to obtain a second area. The first determination unit is used for determining whether the first area and the second area are consistent. The second determination unit is configured to take the first area and the second area as the positioning area when the first area and the second area are identical.
As an alternative embodiment, the apparatus may further comprise: a third searching module and a first determining module. Specifically, the third searching module is configured to search, for the control tree corresponding to the user interface, N controls closest to the target control. The first determining module is used for taking the N controls as auxiliary controls associated with the target control in the user interface.
As an alternative embodiment, the apparatus further comprises: a fourth searching module and a second determining module. Specifically, the fourth searching module is configured to search, for a control tree corresponding to the user interface, a sibling node of a target node, where the target node corresponds to the target control. And the second determining module is used for taking the control corresponding to the sibling node as an auxiliary control associated with the target control in the user interface.
As an alternative embodiment, the apparatus may further comprise a saving module, for example. Specifically, the saving module is configured to save the second control information and the second relative position in a configuration file of the test script. And the second control information is control information of an auxiliary control associated with the target control in the user interface. The second relative position is a relative position between an auxiliary control associated with the target control and the target control in the user interface.
It should be noted that, the apparatus part embodiment of the present disclosure corresponds to the same or similar method part embodiment of the present disclosure, and the description of the apparatus part specifically refers to the description of the method part, and is not repeated herein.
Any of the modules, units, or at least part of the functionality of any of them according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules and units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, units according to the embodiments of the present disclosure may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by any other reasonable means of hardware or firmware by integrating or packaging the circuits, or in any one of three implementations of software, hardware and firmware, or in any suitable combination of any of them. Alternatively, one or more of the modules, units according to embodiments of the present disclosure may be implemented at least partly as computer program modules, which, when executed, may perform the respective functions.
For example, any plurality of the first lookup module 401, the second lookup module 402, the positioning module 403 and the operation module 404 may be combined and implemented in one module/unit/sub-unit, or any one of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to an embodiment of the present disclosure, at least one of the first lookup module 401, the second lookup module 402, the positioning module 403, and the operation module 404 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in any one of three implementations of software, hardware, and firmware, or in a suitable combination of any of them. Alternatively, at least one of the first lookup module 401, the second lookup module 402, the positioning module 403 and the operation module 404 may be at least partially implemented as a computer program module, which when executed may perform a corresponding function.
FIG. 5 schematically illustrates a block diagram of a computer system suitable for implementing the control operation method and apparatus according to an embodiment of the present disclosure. The computer system illustrated in FIG. 5 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 5, a computer system 500 according to an embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. The processor 501 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 501 may also include onboard memory for caching purposes. Processor 501 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 503, various programs and data necessary for the operation of the system 500 are stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. The processor 501 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 502 and/or the RAM 503. Note that the programs may also be stored in one or more memories other than the ROM 502 and the RAM 503. The processor 501 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, system 500 may also include an input/output (I/O) interface 505, input/output (I/O) interface 505 also being connected to bus 504. The system 500 may also include one or more of the following components connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program, when executed by the processor 501, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, a computer-readable storage medium may include ROM 502 and/or RAM 503 and/or one or more memories other than ROM 502 and RAM 503 described above.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (10)

1. A control operation method, comprising:
searching a target control to be operated aiming at a user interface;
if the target control cannot be found, searching an auxiliary control associated with the target control in the user interface;
if the auxiliary control associated with the target control is found, positioning the target control by using the found auxiliary control; and
and performing relevant operation on the positioning area.
2. The method of claim 1, wherein the locating the target control with the found secondary control comprises:
acquiring first control information and a first relative position, wherein the first control information is control information of the found auxiliary control, and the first relative position is a relative position between the found auxiliary control and the target control; and
and positioning the target control according to the first control information and the first relative position.
3. The method of claim 1, wherein the locating the target control with the found secondary control comprises:
finding out a first control and a second control from the found auxiliary controls;
positioning the target control by using the first control to obtain a first area;
positioning the target control by using the second control to obtain a second area;
in response to the first area and the second area coinciding, treating the first area and the second area as the positioning area.
4. The method of claim 3, wherein the locating the target control with the found secondary control further comprises:
in response to the first region and the second region not being consistent, finding a third control from the found auxiliary controls; and
and utilizing the first control and the third control to continue positioning the target control.
5. The method of claim 1, wherein the method further comprises:
searching N controls closest to the target control aiming at a control tree corresponding to the user interface; and
and taking the N controls as auxiliary controls associated with the target control in the user interface.
6. The method of claim 1, wherein the method further comprises:
searching brother nodes of a target node aiming at a control tree corresponding to the user interface, wherein the target node corresponds to the target control; and
and taking the control corresponding to the brother node as an auxiliary control associated with the target control in the user interface.
7. The method of claim 1, wherein the method further comprises:
saving the second control information and the second relative position to a configuration file of the test script, wherein,
the second control information is control information of an auxiliary control associated with the target control in the user interface;
the second relative position is a relative position between an auxiliary control associated with the target control and the target control in the user interface.
8. A control-operating device, comprising:
the first searching module is used for searching a target control to be operated aiming at a user interface;
the second searching module is used for searching an auxiliary control related to the target control in the user interface under the condition that the target control cannot be found;
the positioning module is used for positioning the target control by using the found auxiliary control under the condition that the auxiliary control associated with the target control is found; and
and the operation module is used for executing relevant operations on the positioning area.
9. A computer system, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 7.
CN201910931002.5A 2019-09-27 2019-09-27 Control operation method and device Pending CN110704320A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910931002.5A CN110704320A (en) 2019-09-27 2019-09-27 Control operation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910931002.5A CN110704320A (en) 2019-09-27 2019-09-27 Control operation method and device

Publications (1)

Publication Number Publication Date
CN110704320A true CN110704320A (en) 2020-01-17

Family

ID=69197298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910931002.5A Pending CN110704320A (en) 2019-09-27 2019-09-27 Control operation method and device

Country Status (1)

Country Link
CN (1) CN110704320A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112882933A (en) * 2021-02-09 2021-06-01 京东数科海益信息科技有限公司 Script recording method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408367A (en) * 2018-09-03 2019-03-01 深圳壹账通智能科技有限公司 A kind of method and terminal of the control element identifying interactive interface
CN109800161A (en) * 2018-12-28 2019-05-24 网宿科技股份有限公司 A kind of components testing method of user interface, electronic equipment and can storage medium
US20200241768A1 (en) * 2019-01-28 2020-07-30 Macronix International Co., Ltd. Configurable security memory region

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408367A (en) * 2018-09-03 2019-03-01 深圳壹账通智能科技有限公司 A kind of method and terminal of the control element identifying interactive interface
CN109800161A (en) * 2018-12-28 2019-05-24 网宿科技股份有限公司 A kind of components testing method of user interface, electronic equipment and can storage medium
US20200241768A1 (en) * 2019-01-28 2020-07-30 Macronix International Co., Ltd. Configurable security memory region

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112882933A (en) * 2021-02-09 2021-06-01 京东数科海益信息科技有限公司 Script recording method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US10866788B2 (en) System and method for automated generation of integration elements modeling process flow for an integration process with a swagger API
EP3249538B1 (en) Function execution prioritization
US11561889B2 (en) Orchestration for automated performance testing
US9652220B2 (en) Zero down-time deployment of new application versions
US10789111B2 (en) Message oriented middleware with integrated rules engine
US9483384B2 (en) Generation of software test code
US10310964B2 (en) System and method for determining relevance of application software maintenance
CN111831325A (en) Method, device, system and medium for updating configuration file in application
EP2778962A1 (en) Silo-aware databases
CN112817831A (en) Application performance monitoring method, device, computer system and readable storage medium
US10025697B2 (en) Generation of automated unit tests for a controller layer system and method
CN111506904B (en) Method and device for online bug repair
CN110704320A (en) Control operation method and device
CN111930629A (en) Page testing method and device, electronic equipment and storage medium
CN112506781B (en) Test monitoring method, device, electronic equipment, storage medium and program product
CN111859403B (en) Dependency vulnerability determination method and device, electronic equipment and storage medium
CN113535590A (en) Program testing method and device
US9792202B2 (en) Identifying a configuration element value as a potential cause of a testing operation failure
CN114253599A (en) Version deployment method, version deployment device, electronic device and storage medium
CN116594876A (en) Interface testing method, device, equipment and storage medium
CN116501634A (en) Test case management method, device, medium and electronic equipment
CN117931668A (en) Interface test management method, device, equipment and medium
CN113806229A (en) Interface change test script multiplexing method, device, equipment, medium and product
CN114218330A (en) ES cluster selection method, ES cluster selection device, ES cluster selection apparatus, ES cluster selection medium, and program product
CN112965815A (en) Host deployment method and device, electronic equipment and computer storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200117

RJ01 Rejection of invention patent application after publication