CN112631704A - Interface element identification method and device, storage medium and electronic equipment - Google Patents

Interface element identification method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112631704A
CN112631704A CN202011569369.6A CN202011569369A CN112631704A CN 112631704 A CN112631704 A CN 112631704A CN 202011569369 A CN202011569369 A CN 202011569369A CN 112631704 A CN112631704 A CN 112631704A
Authority
CN
China
Prior art keywords
target
page
type element
target type
information
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
CN202011569369.6A
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.)
Shenzhen Jizhi Digital Technology Co Ltd
Original Assignee
Shenzhen Jizhi Digital Technology 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 Shenzhen Jizhi Digital Technology Co Ltd filed Critical Shenzhen Jizhi Digital Technology Co Ltd
Priority to CN202011569369.6A priority Critical patent/CN112631704A/en
Publication of CN112631704A publication Critical patent/CN112631704A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides an interface element identification method, an interface element identification device, a storage medium and electronic equipment, which are characterized in that input parameters of a page creation method are configured as links of a target page, a configuration file of the page creation method is generated according to an identifier of a target browser, the page creation method is operated, the target page is accessed through the target browser, information of a target type element in the target page is automatically acquired by calling a filter of a filtering method for pre-packaging the target type element in the page creation method, the problems of time and labor waste and easiness in omission caused by manual interface element identification are solved, and the interface element identification efficiency is improved.

Description

Interface element identification method and device, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of computers, in particular to an interface element identification method, an interface element identification device, a storage medium and electronic equipment.
Background
The UI (User Interface) automated testing task is to find a User Interface element object, obtain basic attributes and methods of the element object, and then simulate manual testing steps to operate the element object, such as simulating automatic mouse click to link, simulating automatic mobile phone click to screen, and the like.
The UI automation test is divided into three parts: identifying interface elements, acquiring element information and automating business logic. However, at present, the identification and acquisition of interface elements in the UI automation test process still need to be completed manually, which is time-consuming and labor-consuming, so that the UI automation test cannot realize real automation.
Disclosure of Invention
In view of this, the invention provides an interface element identification method, an interface element identification device, a storage medium and an electronic device, which are capable of automatically identifying interface elements and improving the efficiency of interface element identification.
In order to achieve the above purpose, the invention provides the following specific technical scheme:
an interface element identification method comprises the following steps:
under the condition of receiving an interface element identification instruction, analyzing the interface element identification instruction to obtain a link of at least one target page and an identifier of at least one target browser;
configuring input parameters of a page creation method as links of the target page, and generating a configuration file of the page creation method according to the identification of the target browser;
running the page creation method to access the target page through the target browser;
and calling a filter in the page creation method, acquiring the information of the target type element in the target page, and storing the information of the target type element in a memory, wherein the filter encapsulates the filtering method of the target type element in advance.
Optionally, the invoking a filter in the page creating method to obtain information of a target type element in the target page includes:
calling a filtering method of the target type element packaged in advance by the filter, and acquiring the information of the target type element including the attribute, the hierarchy and the annotation of the target type element in the target page.
Optionally, the filtering method of the target type element is a common method encapsulated with methods for obtaining all type elements corresponding to the target operation.
Optionally, after storing the information of the target type element in the memory, the method further includes:
and operating a createDAO method packaged in advance in the entity object creation method to generate a corresponding variable of the entity object layer according to the information of the target type element stored in the memory.
Optionally, after generating the corresponding variable of the entity object layer according to the information of the target type element stored in the memory, the method further includes:
and operating a createTable method packaged in advance in the entity object creating method to generate a database object layer field corresponding to the database according to the variable of the entity object layer.
Optionally, the method further includes:
respectively generating a test case corresponding to each test scene according to each preset test scene and the corresponding variable of the entity object layer;
and connecting a plurality of test cases in series according to the dependency relationship among the test cases to obtain a test case set.
Optionally, the method further includes:
and storing the inter-service public data corresponding to the test case set in Redis.
An interface element recognition apparatus comprising:
the interface element identification command analysis unit is used for analyzing the interface element identification command under the condition of receiving the interface element identification command to obtain a link of at least one target page and an identifier of at least one target browser;
the page creation method configuration unit is used for configuring input parameters of a page creation method as a link of the target page and generating a configuration file of the page creation method according to the identification of the target browser;
a page access unit, configured to run the page creation method to access the target page through the target browser;
and the element filtering unit is used for calling a filter in the page creating method, acquiring the information of the target type element in the target page and storing the information of the target type element in a memory, wherein the filter encapsulates the filtering method of the target type element in advance.
Optionally, the element filtering unit is specifically configured to:
calling a filtering method of the target type element packaged in advance by the filter, and acquiring the information of the target type element including the attribute, the hierarchy and the annotation of the target type element in the target page.
Optionally, the filtering method of the target type element is a common method encapsulated with methods for obtaining all type elements corresponding to the target operation.
Optionally, the apparatus further comprises:
and the entity object generation unit is used for operating a createDAO method packaged in advance in the entity object creation method after the information of the target type element is stored in the memory so as to generate a corresponding variable of an entity object layer according to the information of the target type element stored in the memory.
Optionally, the apparatus further comprises:
and the database object generating unit is used for operating a createTable method packaged in advance in the entity object creating method after generating corresponding variables of the entity object layer according to the information of the target type element stored in the memory so as to generate database object layer fields corresponding to the database according to the variables of the entity object layer.
Optionally, the apparatus further comprises:
the test case generating unit is used for generating a test case corresponding to each test scene according to each preset test scene and the corresponding variable of the entity object layer;
and the test case series unit is used for connecting a plurality of test cases in series according to the dependency relationship among the test cases to obtain a test case set.
Optionally, the apparatus further comprises:
and the public data storage unit is used for storing the inter-service public data corresponding to the test case set in Redis.
A storage medium, which includes a stored program, and when the program runs, controls a device on which the storage medium is located to execute the interface element identification method disclosed in the foregoing embodiment.
An electronic device, comprising: a memory and a processor;
wherein the memory is used for storing programs;
the processor calls the program and is used for executing the interface element identification method disclosed by the embodiment.
Compared with the prior art, the invention has the following beneficial effects:
the interface element identification method disclosed by the invention has the advantages that the input parameters of the page creation method are configured into the links of the target page, the configuration file of the page creation method is generated according to the identification of the target browser, the page creation method is operated, the target page is accessed through the target browser, the filter of the filtering method of the target type element is packaged in the page creation method in advance is called, the information of the target type element in the target page is automatically acquired, the problems of time and labor waste and easiness in omission caused by manual interface element identification are solved, and the interface element identification efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flow chart of an interface element identification method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an element filtering code according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a test case generation method disclosed in the embodiment of the present invention;
fig. 4 is a schematic structural diagram of an interface element recognition apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a method for automatically identifying interface elements, which assists UI testers to obtain the interface elements of a page to be tested so as to realize UI automatic testing.
Specifically, referring to fig. 1, the method for identifying an interface element disclosed in this embodiment includes the following steps:
s101: and under the condition of receiving the interface element identification instruction, analyzing the interface element identification instruction to obtain the link of at least one target page and the identifier of at least one target browser.
The target page is a page to be tested, namely a page from which interface elements need to be obtained.
The link of the target page can be a specific page link, such as https:// www.baidu.com/, or can be a link of a plurality of target pages represented by regular expressions.
The target browser is a browser which needs to be called for accessing a target page and can be a PC-side browser, an IOS operating system browser, an Android operating system browser, such as an IE browser, a Chrome browser, a Firefox browser, a UC browser, and the like, and the identifier of the target browser is used for uniquely representing the target browser and distinguishing the target browser from other browsers.
S102: and configuring the input parameters of the page creation method as links of the target page, and generating a configuration file of the page creation method according to the identification of the target browser.
According to the universal page creating method createPage for identifying the interface elements, aiming at different interface element identification requirements, only the input parameters of the page creating method need to be configured as the links of the pages corresponding to the interface element identification requirements, and configuration files are generated according to the browser identifications corresponding to the interface element identification requirements, so that the learning threshold of testers is reduced, and the training and learning period of the testers is shortened.
The page creation method createPage in this embodiment may call a browser core driving method that has already been integrated with a framework, determine which browser is specifically and directly called according to a configuration file, and may simultaneously acquire elements of a target page accessed by one or more target browsers.
S103: a page creation method is run to access a target page through a target browser.
S104: calling a filter in the page creation method, acquiring the information of the target type element in the target page, and storing the information of the target type element in a memory, wherein the filter encapsulates the filtering method of the target type element in advance.
It should be noted that the target type element may be all type elements or may be a specified type element, that is, a filtering method for encapsulating, in advance, the type element corresponding to the interface element identification requirement in the filter according to the interface element identification requirement is obtained as long as the encapsulated element type can be filtered.
Specifically, referring to fig. 2, a filtering method of a target type element pre-packaged by a filter is called, and information of the target type element including an attribute, a hierarchy, and a comment of the target type element in a target page is obtained. That is, after the page creation method is called, all codes of the target type elements are automatically created in the form of Java files in the user's project, including types, elements, parameters, and comments, which is convenient for informing the user what is specific.
The inventor also finds out through research that: the same type of operation corresponds to multiple page elements, like an enter (enter), and the enter key is pressed in manual operation, but the page elements can be written in dozens of writing methods such as div frames and em frames, and if each element writes a certain method, the element needs to be manually positioned and written to the code, which is time-consuming and labor-consuming.
In order to solve the above problems, in the embodiment of the present invention, a common method for obtaining all types of elements corresponding to a target operation is encapsulated in a filter, for example, a common method for obtaining all types of elements corresponding to carriage return is encapsulated, and only the common method needs to be called when identifying an interface element, so that time of a tester is greatly saved, and interface element identification efficiency is improved.
Further, after the information of the target type element is stored in the memory, in order to facilitate subsequent creation of a test case, in the embodiment of the present invention, a solid object creation method createban is called to generate a corresponding variable of a solid object (BEAN) layer and a database object (DAO) layer field corresponding to a database, so as to create a test case.
Referring to fig. 3, a test case generating method disclosed in this embodiment includes the following steps:
s201: and under the condition of receiving the interface element identification instruction, analyzing the interface element identification instruction to obtain the link of at least one target page and the identifier of at least one target browser.
S202: and configuring the input parameters of the page creation method as links of the target page, and generating a configuration file of the page creation method according to the identification of the target browser.
S203: a page creation method is run to access a target page through a target browser.
S204: calling a filter in the page creation method, acquiring the information of the target type element in the target page, and storing the information of the target type element in a memory, wherein the filter encapsulates the filtering method of the target type element in advance.
S205: and operating a createDAO method packaged in advance in the entity object creation method to generate a corresponding variable of the entity object layer according to the information of the target type element stored in the memory.
Dao (data Access object) the data Access object is an object-oriented database interface.
S206: and operating a createTable method packaged in advance in the entity object creating method to generate a database object layer field corresponding to the database according to the variable of the entity object layer.
The encapsulated createTable method realizes the association of the database field and the entity object, and the database field does not need to be separately set after the association of the database field and the entity object.
Under the condition that the element attribute needs to be modified, codes do not need to be rewritten, and only corresponding fields need to be modified in the database.
S207: and respectively generating a test case corresponding to each test scene according to the preset test scenes and the corresponding variable of the entity object layer.
The test scenarios correspond to the test cases one by one, and each test case comprises a plurality of atomic operations.
Taking a test scenario as an example of inputting a keyword in a target page and searching, atomic operations in a test case corresponding to the test scenario include: and inputting a keyword and clicking a search button, wherein the corresponding interface elements comprise an input box and a search button.
The element information corresponding to the input box and the search button is obtained in advance through steps S201 to S204, the corresponding variable of the corresponding entity object layer is generated through step S205, the database object layer field corresponding to the database is generated through step S206, and the test case corresponding to the test scenario is generated through step S207.
S208: and connecting a plurality of test cases in series according to the dependency relationship among the test cases to obtain a test case set.
In this embodiment, the dependency relationship between the test cases is specifically determined in a reverse retrospective manner, for example, if the execution of the test case 1 depends on the test case 2, and the execution of the test case 2 depends on the test case 3, the three test cases are connected in series according to the dependency relationship between the test case 3-the test case 2-the test case 1, and a test case set including the test case 1, the test case 2, and the test case 3 is generated, and the execution sequence of the three test cases in the test case set is: test case 3-test case 2-test case 1.
It can be seen that, in this embodiment, the interface elements are automatically identified, and after the interface elements are automatically identified, through operating the createDAO method pre-packaged in the entity object creation method, the corresponding variable of the entity object layer is generated according to the information of the target type element stored in the memory, and operating the creattable method pre-packaged in the entity object creation method, the database object layer field corresponding to the database is generated according to the variable of the entity object layer, and then the test case corresponding to each test scenario is generated according to each preset test scenario and the corresponding variable of the entity object layer, and a plurality of test cases are connected in series according to the dependency relationship between the test cases, so as to obtain a test case set, thereby implementing automation of the whole UI test and improving the UI test efficiency.
It can be understood that, in the UI test process, if the inter-service public data such as the account number and the password generated by registration is stored in the database, dirty data may be caused along with accumulation of test data, a long-term base table structure may be large, and needs to be managed by a specially-assigned person, and the inter-service public data in the database may be destroyed, which causes waste of human resources.
In order to solve the above problems, in the embodiments of the present invention, inter-service public data corresponding to a test case set is stored in Redis or other storage media of the same type, and the Redis or other storage media of the same type are characterized in that data stored before being automatically destroyed is re-logged or used each time, that is, the inter-service public data corresponding to the test case set is automatically destroyed after a UI test is completed each time, and thus, a special person is not required to manage, and waste of human resources is avoided.
Because the inter-service public data corresponding to the test sample set is automatically destroyed after the UI test is finished each time, the inter-service public data can be repeatedly used in the UI test for many times, and the worry about the repeated data storage of the database is avoided.
Moreover, the query speed of Redis is high, and a tester can conveniently query the inter-service public data in Redis by using a uniform key.
Based on the interface element recognition method disclosed in the foregoing embodiment, this embodiment correspondingly discloses an interface element recognition apparatus, please refer to fig. 4, which includes:
the element identification instruction analyzing unit 100 is configured to, in a case that an interface element identification instruction is received, analyze the interface element identification instruction to obtain a link of at least one target page and an identifier of at least one target browser;
a page creation method configuration unit 200, configured to configure an input parameter of a page creation method as a link of the target page, and generate a configuration file of the page creation method according to the identifier of the target browser;
a page access unit 300, configured to run the page creation method to access the target page through the target browser;
the element filtering unit 400 is configured to invoke a filter in the page creation method, acquire information of a target type element in the target page, and store the information of the target type element in a memory, where the filter encapsulates a filtering method of the target type element in advance.
Optionally, the element filtering unit 400 is specifically configured to:
calling a filtering method of the target type element packaged in advance by the filter, and acquiring the information of the target type element including the attribute, the hierarchy and the annotation of the target type element in the target page.
Optionally, the filtering method of the target type element is a common method encapsulated with methods for obtaining all type elements corresponding to the target operation.
Optionally, the apparatus further comprises:
and the entity object generation unit is used for operating a createDAO method packaged in advance in the entity object creation method after the information of the target type element is stored in the memory so as to generate a corresponding variable of an entity object layer according to the information of the target type element stored in the memory.
Optionally, the apparatus further comprises:
and the database object generating unit is used for operating a createTable method packaged in advance in the entity object creating method after generating corresponding variables of the entity object layer according to the information of the target type element stored in the memory so as to generate database object layer fields corresponding to the database according to the variables of the entity object layer.
Optionally, the apparatus further comprises:
the test case generating unit is used for generating a test case corresponding to each test scene according to each preset test scene and the corresponding variable of the entity object layer;
and the test case series unit is used for connecting a plurality of test cases in series according to the dependency relationship among the test cases to obtain a test case set.
Optionally, the apparatus further comprises:
and the public data storage unit is used for storing the inter-service public data corresponding to the test case set in Redis.
According to the interface element recognition device disclosed by the embodiment, the input parameters of the page creation method are configured to be the links of the target page, the configuration file of the page creation method is generated according to the identification of the target browser, the page creation method is operated, the target page is accessed through the target browser, the filter of the filtering method of the target type element is packaged in the page creation method in advance is called, the information of the target type element in the target page is automatically acquired, the problems that time and labor are wasted and omission easily occurs due to manual interface element recognition are solved, and the interface element recognition efficiency is improved.
The embodiment of the invention also discloses a storage medium, which comprises a stored program, wherein when the program runs, the equipment where the storage medium is located is controlled to execute the following interface element identification method:
under the condition of receiving an interface element identification instruction, analyzing the interface element identification instruction to obtain a link of at least one target page and an identifier of at least one target browser;
configuring input parameters of a page creation method as links of the target page, and generating a configuration file of the page creation method according to the identification of the target browser;
running the page creation method to access the target page through the target browser;
and calling a filter in the page creation method, acquiring the information of the target type element in the target page, and storing the information of the target type element in a memory, wherein the filter encapsulates the filtering method of the target type element in advance.
Further, the calling the filter in the page creation method to obtain the information of the target type element in the target page includes:
calling a filtering method of the target type element packaged in advance by the filter, and acquiring the information of the target type element including the attribute, the hierarchy and the annotation of the target type element in the target page.
Further, the filtering method of the target type element is a common method encapsulated with methods for acquiring all type elements corresponding to the target operation.
Further, after storing the information of the target type element to a memory, the method further comprises:
and operating a createDAO method packaged in advance in the entity object creation method to generate a corresponding variable of the entity object layer according to the information of the target type element stored in the memory.
Further, after generating the corresponding variable of the entity object layer according to the information of the target type element stored in the memory, the method further includes:
and operating a createTable method packaged in advance in the entity object creating method to generate a database object layer field corresponding to the database according to the variable of the entity object layer.
Further, the method further comprises:
respectively generating a test case corresponding to each test scene according to each preset test scene and the corresponding variable of the entity object layer;
and connecting a plurality of test cases in series according to the dependency relationship among the test cases to obtain a test case set.
Further, the method further comprises:
and storing the inter-service public data corresponding to the test case set in Redis.
The embodiment of the invention also discloses an electronic device, which comprises: a memory and a processor;
wherein the memory is used for storing programs;
the processor calls the program and is used to execute the following interface element recognition method:
under the condition of receiving an interface element identification instruction, analyzing the interface element identification instruction to obtain a link of at least one target page and an identifier of at least one target browser;
configuring input parameters of a page creation method as links of the target page, and generating a configuration file of the page creation method according to the identification of the target browser;
running the page creation method to access the target page through the target browser;
and calling a filter in the page creation method, acquiring the information of the target type element in the target page, and storing the information of the target type element in a memory, wherein the filter encapsulates the filtering method of the target type element in advance.
Further, the calling the filter in the page creation method to obtain the information of the target type element in the target page includes:
calling a filtering method of the target type element packaged in advance by the filter, and acquiring the information of the target type element including the attribute, the hierarchy and the annotation of the target type element in the target page.
Further, the filtering method of the target type element is a common method encapsulated with methods for acquiring all type elements corresponding to the target operation.
Further, after storing the information of the target type element to a memory, the method further comprises:
and operating a createDAO method packaged in advance in the entity object creation method to generate a corresponding variable of the entity object layer according to the information of the target type element stored in the memory.
Further, after generating the corresponding variable of the entity object layer according to the information of the target type element stored in the memory, the method further includes:
and operating a createTable method packaged in advance in the entity object creating method to generate a database object layer field corresponding to the database according to the variable of the entity object layer.
Further, the method further comprises:
respectively generating a test case corresponding to each test scene according to each preset test scene and the corresponding variable of the entity object layer;
and connecting a plurality of test cases in series according to the dependency relationship among the test cases to obtain a test case set.
Further, the method further comprises:
and storing the inter-service public data corresponding to the test case set in Redis.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above embodiments can be combined arbitrarily, and the features described in the embodiments in the present specification can be replaced or combined with each other in the above description of the disclosed embodiments, so that those skilled in the art can implement or use the present application.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An interface element recognition method, comprising:
under the condition of receiving an interface element identification instruction, analyzing the interface element identification instruction to obtain a link of at least one target page and an identifier of at least one target browser;
configuring input parameters of a page creation method as links of the target page, and generating a configuration file of the page creation method according to the identification of the target browser;
running the page creation method to access the target page through the target browser;
and calling a filter in the page creation method, acquiring the information of the target type element in the target page, and storing the information of the target type element in a memory, wherein the filter encapsulates the filtering method of the target type element in advance.
2. The method of claim 1, wherein said invoking a filter in the page creation method to obtain information of a target type element in the target page comprises:
calling a filtering method of the target type element packaged in advance by the filter, and acquiring the information of the target type element including the attribute, the hierarchy and the annotation of the target type element in the target page.
3. The method of claim 2, wherein the filtering method of the target type element is a common method encapsulated with methods for obtaining all types of elements corresponding to the target operation.
4. The method of claim 1, wherein after storing the information of the target type element to memory, the method further comprises:
and operating a createDAO method packaged in advance in the entity object creation method to generate a corresponding variable of the entity object layer according to the information of the target type element stored in the memory.
5. The method of claim 4, wherein after generating the corresponding variable of the entity object layer according to the information of the target type element stored in the memory, the method further comprises:
and operating a createTable method packaged in advance in the entity object creating method to generate a database object layer field corresponding to the database according to the variable of the entity object layer.
6. The method of claim 5, further comprising:
respectively generating a test case corresponding to each test scene according to each preset test scene and the corresponding variable of the entity object layer;
and connecting a plurality of test cases in series according to the dependency relationship among the test cases to obtain a test case set.
7. The method of claim 6, further comprising:
and storing the inter-service public data corresponding to the test case set in Redis.
8. An interface element recognition apparatus, comprising:
the interface element identification command analysis unit is used for analyzing the interface element identification command under the condition of receiving the interface element identification command to obtain a link of at least one target page and an identifier of at least one target browser;
the page creation method configuration unit is used for configuring input parameters of a page creation method as a link of the target page and generating a configuration file of the page creation method according to the identification of the target browser;
a page access unit, configured to run the page creation method to access the target page through the target browser;
and the element filtering unit is used for calling a filter in the page creating method, acquiring the information of the target type element in the target page and storing the information of the target type element in a memory, wherein the filter encapsulates the filtering method of the target type element in advance.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device on which the storage medium is located is controlled to execute the interface element recognition method according to any one of claims 1 to 7.
10. An electronic device, comprising: a memory and a processor;
wherein the memory is used for storing programs;
a processor calls a program and is adapted to perform the interface element recognition method according to any of claims 1-7.
CN202011569369.6A 2020-12-26 2020-12-26 Interface element identification method and device, storage medium and electronic equipment Pending CN112631704A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011569369.6A CN112631704A (en) 2020-12-26 2020-12-26 Interface element identification method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011569369.6A CN112631704A (en) 2020-12-26 2020-12-26 Interface element identification method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112631704A true CN112631704A (en) 2021-04-09

Family

ID=75325913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011569369.6A Pending CN112631704A (en) 2020-12-26 2020-12-26 Interface element identification method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112631704A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114417396A (en) * 2021-12-13 2022-04-29 奇安盘古(上海)信息技术有限公司 Privacy policy text data extraction method and device, electronic equipment and storage medium
CN114428575A (en) * 2022-01-24 2022-05-03 京北方信息技术股份有限公司 Interface element detection and identification method and device, storage medium and electronic equipment
CN114845312A (en) * 2022-04-02 2022-08-02 四川安迪科技实业有限公司 Method for automatically setting up networking environment based on TDMA satellite network management

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130212435A1 (en) * 2012-02-14 2013-08-15 Microsoft Corporation Integrated Fuzzing
US9507700B1 (en) * 2015-12-22 2016-11-29 Sap Se Generic method for automated software testing
CN107590068A (en) * 2017-08-04 2018-01-16 东软集团股份有限公司 Browser page method of testing, device and computer equipment
CN108628741A (en) * 2018-04-10 2018-10-09 平安科技(深圳)有限公司 Webpage test method, device, electronic equipment and medium
CN110399586A (en) * 2019-07-31 2019-11-01 深圳前海微众银行股份有限公司 Automatic processing method, device, equipment and the medium of web interface element

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130212435A1 (en) * 2012-02-14 2013-08-15 Microsoft Corporation Integrated Fuzzing
US9507700B1 (en) * 2015-12-22 2016-11-29 Sap Se Generic method for automated software testing
CN107590068A (en) * 2017-08-04 2018-01-16 东软集团股份有限公司 Browser page method of testing, device and computer equipment
CN108628741A (en) * 2018-04-10 2018-10-09 平安科技(深圳)有限公司 Webpage test method, device, electronic equipment and medium
CN110399586A (en) * 2019-07-31 2019-11-01 深圳前海微众银行股份有限公司 Automatic processing method, device, equipment and the medium of web interface element

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114417396A (en) * 2021-12-13 2022-04-29 奇安盘古(上海)信息技术有限公司 Privacy policy text data extraction method and device, electronic equipment and storage medium
CN114428575A (en) * 2022-01-24 2022-05-03 京北方信息技术股份有限公司 Interface element detection and identification method and device, storage medium and electronic equipment
CN114845312A (en) * 2022-04-02 2022-08-02 四川安迪科技实业有限公司 Method for automatically setting up networking environment based on TDMA satellite network management
CN114845312B (en) * 2022-04-02 2023-05-16 四川安迪科技实业有限公司 Method for automatically building networking environment based on TDMA satellite network management

Similar Documents

Publication Publication Date Title
CN112631704A (en) Interface element identification method and device, storage medium and electronic equipment
CN110442511B (en) Visual embedded point testing method and device
US8402434B2 (en) Graphical user interface (GUI) script generation and documentation
CN110008113B (en) Test method and device and electronic equipment
CN109189469B (en) Reflection-based android application micro-servitization method and system
CN101526919B (en) Method for generating script files to test Web application software and device thereof
CN109189374B (en) Object structure code generation method and system based on object reference chain
CN110825619A (en) Automatic generation method and device of interface test case and storage medium
CN109240666B (en) Function calling code generation method and system based on call stack and dependent path
CN113342685A (en) Precise test method and device, computer equipment and storage medium
CN110795085A (en) Mobile application visual editing method and tool
CN104182347A (en) Test requirement automatic analysis method based on automatic test platform
CN114741360A (en) Automobile part file reconstruction method and device, terminal equipment and storage medium
CN110990282B (en) Automatic unit testing method
CN113515464B (en) Honeypot testing method and device based on linux system
CN109063040B (en) Client program data acquisition method and system
CN114297961A (en) Chip test case processing method and related device
CN111259212A (en) Telemetering data interpretation method, device, equipment and storage medium
CN112162908A (en) Program call link monitoring implementation method and device based on bytecode injection technology
CN115757174A (en) Database difference detection method and device
CN114880239A (en) Interface automation testing framework and method based on data driving
CN115481025A (en) Script recording method and device for automatic test, computer equipment and medium
CN113672509A (en) Automatic testing method, device, testing platform and storage medium
Jain et al. Comparative study of software automation testing tools: OpenScript and selenium
CN107506299B (en) Code analysis method and terminal 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210409

RJ01 Rejection of invention patent application after publication