CN109634492A - Combobox designated value input method, device and computer readable storage medium - Google Patents

Combobox designated value input method, device and computer readable storage medium Download PDF

Info

Publication number
CN109634492A
CN109634492A CN201811238680.5A CN201811238680A CN109634492A CN 109634492 A CN109634492 A CN 109634492A CN 201811238680 A CN201811238680 A CN 201811238680A CN 109634492 A CN109634492 A CN 109634492A
Authority
CN
China
Prior art keywords
combobox
designated value
value
app
input method
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
CN201811238680.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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201811238680.5A priority Critical patent/CN109634492A/en
Publication of CN109634492A publication Critical patent/CN109634492A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor
    • 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

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)
  • Stored Programmes (AREA)

Abstract

The present invention provides a kind of combobox designated value input method, the described method includes: controlling electronic devices, which executes test script, carries out UI test to specified App, wherein, the user interface of the App includes customized combobox, and the combobox corresponds to multiple option values;It needs to obtain total Options value corresponding to the combobox when the combobox inputs designated value when going to;Index value corresponding to each option value is determined according to acquired total Options value;And the Index value according to corresponding to the designated value, the designated value is inputted in the combobox.The present invention also provides a kind of devices and storage medium for realizing the combobox designated value input method.Present invention optimizes the testing process of App, a specific value can not be selected by sliding by solving the problems, such as App during the test.

Description

Combobox designated value input method, device and computer readable storage medium
Technical field
The present invention relates to field of computer technology, and in particular to a kind of combobox designated value input method, device and calculates Machine readable storage medium storing program for executing.
Background technique
Currently, electronic equipment is when carrying out UI (user interface, user interface) automatic test, the HTML5 page Customized combobox can not select also obtain selected value to select a specific value by sliding.
Summary of the invention
In view of the foregoing, it is necessary to propose a kind of combobox designated value input method, device and computer-readable storage Medium, a technical issues of specific value can not be selected by sliding to solve App during the test.
The first aspect of the present invention provides a kind of combobox designated value input method, which comprises control electronics is set The standby test script that executes is to specified App progress UI test, wherein and the user interface of the App includes customized combobox, The combobox corresponds to multiple option values;It needs to obtain the combobox when the combobox inputs designated value when going to Corresponding total Options value;Index value corresponding to each option value is determined according to acquired total Options value;And according to Index value corresponding to the designated value, inputs the designated value in the combobox.
Preferably, total Options value corresponding to the acquisition combobox includes: to obtain the current use of the App HTML code corresponding to the interface of family;The acquired HTML code of parsing, obtains the mark of the combobox;And according under described The mark of frame is drawn to obtain total Options value corresponding to the combobox.
Preferably, HTML code corresponding to the current user interface for obtaining the App includes: calling function Appium getPageSource () obtains HTML code corresponding to the current user interface of the App.
Preferably, HTML code acquired in the parsing, the mark for obtaining the combobox include: to call Jsoup solution The acquired HTML code of analysis, obtains the mark of the combobox.
Preferably, the Index value according to corresponding to the designated value, inputs the designated value in the combobox It include: to call function Apiium executeScript () Index value according to corresponding to the designated value, in the drop-down The designated value is inputted in frame.
Preferably, the user interface of the App is created using hypertext markup language.
Preferably, the electronic equipment is mobile phone, tablet computer, smart television or wearable device.
Preferably, the test script calls pre-stored UI test case to carry out UI test to the App.
The second aspect of the present invention provides a kind of computer installation, and the computer installation includes processor, the processing Device is for realizing the combobox designated value input method when executing the computer program stored in memory.
The third aspect of the present invention provides a kind of computer readable storage medium, is stored thereon with computer program, special Sign is that the computer program realizes the combobox designated value input method when being executed by processor.
The fourth aspect of the present invention provides a kind of combobox designated value input unit, and described device includes: execution module, uses Test script is executed in controlling electronic devices, UI test is carried out to specified App, wherein the user interface of the App includes certainly The combobox of definition, the combobox correspond to multiple option values;The execution module is also used to go to needs under described When drawing frame input designated value, total Options value corresponding to the combobox is obtained;The execution module is also used to according to being obtained The total Options value taken determines Index value corresponding to each option value;And the execution module, it is also used to according to described specified The corresponding Index value of value, inputs the designated value in the combobox.
Combobox designated value input method described in the embodiment of the present invention, device and computer readable storage medium, UI test script goes to needs when combobox inputs a designated value, obtains HTML generation corresponding to current user interface Code, parsing HTML code obtain mark corresponding to combobox, get combobox institute according to mark corresponding to the combobox Corresponding total Options value.This case realizes the designated value in combobox according to the Index value of acquired option value Input, it is easy to operate.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is the application environment architecture diagram for the combobox designated value input method that the embodiment of the present invention one provides.
Fig. 2 is the flow chart of combobox designated value input method provided by Embodiment 2 of the present invention.
Fig. 3 is the structure chart for the combobox designated value input unit that the embodiment of the present invention three provides.
Fig. 4 is the schematic diagram for the computer installation that the embodiment of the present invention four provides.
The present invention that the following detailed description will be further explained with reference to the above drawings.
Specific embodiment
To better understand the objects, features and advantages of the present invention, with reference to the accompanying drawing and specific real Applying example, the present invention will be described in detail.It should be noted that in the absence of conflict, the embodiment of the present invention and embodiment In feature can be combined with each other.
In the following description, numerous specific details are set forth in order to facilitate a full understanding of the present invention, described embodiment is only It is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill Personnel's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Unless otherwise defined, all technical and scientific terms used herein and belong to technical field of the invention The normally understood meaning of technical staff is identical.Term as used herein in the specification of the present invention is intended merely to description tool The purpose of the embodiment of body, it is not intended that in the limitation present invention.
Embodiment one
As shown in fig.1, the application environment framework of the combobox designated value input method provided for the embodiment of the present invention one Figure.
Combobox designated value input method of the invention is applied in a computer installation and one or more electronic equipments In the environment of composition.For example, in the environment being made of computer installation 3 and electronic equipment 4.
In the present embodiment, the computer installation 3 can be the equipment such as server or PC.The electronic equipment 4 It can be the devices such as mobile phone, tablet computer, smart television, wearable device.
In one embodiment, the computer installation 3 and electronic equipment 4 can pass through wired (such as USB (Universal Serial Bus, universal serial bus) or wirelessly establish communication connection.The wireless mode can be with It is any type of conventional wireless mechanics of communication, such as radio, Wireless Fidelity (Wireless Fidelity, WIFI), bee Nest, satellite, broadcast etc..Wireless communication technique may include, but be not limited to, global system for mobile communications (Global System For Mobile Communications, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), CDMA (Code Division Multiple Access, CDMA), wideband code division multiple access (W-CDMA), CDMA2000, IMT single carrier (IMT Single Carrier), enhanced data rates for gsm evolution (Enhanced Data Rates for GSM Evolution, EDGE), it is Long Term Evolution (Long-Term Evolution, LTE), advanced long-term Evolution technology, time-division Long Term Evolution (Time-Division LTE, TD-LTE), high performance radio local area network (High Performance Radio Local Area Network, HiperLAN), high performance radio wide area network (High Performance Radio Wide Area Network, HiperWAN), local multiple spot distribute business (Local Multipoint Distribution Service, LMDS), full micro-wave access global inter communication (Worldwide Interoperability for Microwave Access, WiMAX), ZigBee protocol (ZigBee), bluetooth, orthogonal frequency division multiplexing It is empty with technology (Flash Orthogonal Frequency-Division Multiplexing, Flash-OFDM), large capacity Division multiple access (High Capacity Spatial Division Multiple Access, HC-SDMA), General Mobile electricity Letter system (Universal Mobile Telecommunications System, UMTS), Universal Mobile Telecommunications System time-division Duplexing (UMTS Time-Division Duplexing, UMTS-TDD), evolved high-speed packet access (Evolved High Speed Packet Access, HSPA+), TD SDMA (Time Division Synchronous Code Division Multiple Access, TD-SCDMA), evolution data optimization (Evolution-Data Optimized, EV-DO), Digital Enhanced Cordless Communications (Digital Enhanced Cordless Telecommunications, DECT) and Other.
Embodiment two
Fig. 2 is the flow chart of combobox designated value input method provided by Embodiment 2 of the present invention.
In the present embodiment, the combobox designated value input method can be applied in computer installation, for needing The computer installation for carrying out the input of combobox designated value, can directly integrate method of the invention on a computing means and be provided For combobox designated value input function, or with Software Development Kit (Software Development Kit, SDK form operation) is on a computing means.
As shown in Fig. 2, the combobox designated value input method specifically includes following steps, institute according to different requirements, The sequence for stating step in flow chart can change, and certain steps can be omitted.
Step S1, computer installation determines that a test script, the test script are used for the specified App in electronic equipment (Application, application program) carries out UI test.Wherein, the user interface of the App uses hypertext markup language (HyperText Markup Language, HTML) is created, and the user interface of the App includes customized combobox, The combobox corresponds to multiple option values.The test script is included in the combobox UI test that the App is carried out A designated value is inputted, the designated value is one of value in the multiple option value.
Hypertext markup language is a kind of for creating the standard markup language of webpage, and being marked by label symbol will show The various pieces in webpage shown." hypertext " just refers in the page that may include picture, link or even audio, program etc. non- Text element.The structure of hypertext markup language includes " head " part (Head) and " main body " part (Body).Wherein, " head " Part provides the information about webpage, and " main body " part provides the particular content of webpage.
In the present embodiment, the hypertext markup language can be HTML5, i.e. the 5th generation hypertext markup language. HTML5 is the newest revision version of HTML, completes standard formulation by World Wide Web Consortium (W3C) in October, 2014.HTML5's sets Counting purpose is to support multimedia on the mobile apparatus.HTML5 has some new characteristics, comprising: (1) for drawing Canvas element;(2) video the and audio element for medium playback;(3) there is better support to local offline storage; (4) new special content element, such as article, footer, header, nav, section;(5) new form controls, than Such as calendar, date, time, email, url, search.
In the present embodiment, the specified App can interact to be any with user, have visual user The application program at interface, such as can be shopping platform, audio player, image editor, game, e-book etc..
In one embodiment, the compatibility at the interface UI for testing the App can be referred to by carrying out UI test to the App Property.For example, whether test each element at the interface UI of the App can normally show under Windows operating system.At one In embodiment, each element includes, but are not limited to text, picture, audio, animation, video, hyperlink, data and inputs and connect Mouthful etc..
In one embodiment, one or more UI test cases, the test has been stored in advance in the computer installation Script calls the pre-stored UI test case to carry out UI test to the App.In other embodiments, the test foot This is test case in itself.
Step S2, the described computer installation controls the electronic equipment and executes the test script to carry out to the App UI test.Wherein, when going to needs when the combobox inputs the designated value, institute corresponding to the combobox is obtained There is option value.
It is described to obtain total Options value corresponding to the combobox and include:
(1) HTML code corresponding to the current user interface of the App is obtained.
In one embodiment, it is described to obtain to call function Appium getPageSource () for the computer installation HTML code corresponding to the current user interface of App.
(2) the acquired HTML code of parsing, obtains the mark of the combobox.
(3) the total Options value according to corresponding to the mark of the combobox acquisition combobox.
In one embodiment, the computer installation parses acquired HTML code using Jsoup, obtains combobox Corresponding total Options value.The title of Jsoup is also referred to as Java HTML Parser, is a ready-made API external member of JAVA, The information of HTML and XML can be used to parse, obtained in the mark of different names specified in HTML and XML, and mark The content in face.
Step S3, the described computer installation determines corresponding to each option value according to acquired total Options value Index value (index value) inputs the designated value according to Index value corresponding to the designated value in the combobox.
In one embodiment, the computer installation calls function Apiium executeScript () to come according to Index value corresponding to designated value inputs the designated value in the combobox to realize the input of the designated value.
For example, it is assumed that the App includes one for inputting the combobox in some time, and the combobox is corresponding All times include from 2010,2011,2012....2018 totally 9 times.The test script carries out UI test to the App When need in the combobox input the time 2017.The computer installation then can go to needs in institute in test script It states when inputting time 2017 in combobox, function Appium getPageSource () is called to obtain the current of the App HTML code corresponding to user interface parses acquired HTML code using Jsoup, to obtain the mark of the combobox Know, according to the mark of the combobox get total Options value corresponding to the combobox (such as 2010,2011, 2012....2018 totally 9 times).The computer installation determines that each option value institute is right according to acquired total Options value The Index value answered.For example, determining that the corresponding Index value of time 2010 is 0, the corresponding Index value of time 2011 is 1, according to this Analogize, the corresponding Index value of time 2018 is 9.The computer installation is according to the designated value (i.e. time 2017) institute as a result, Corresponding Index value (i.e. 8) calls function Apiium executeScript () to input in the combobox described specified It is worth (i.e. time 2017).
In conclusion combobox designated value input method described in the embodiment of the present invention, goes in UI test script It needs to obtain HTML code corresponding to current user interface when combobox inputs a designated value, parse HTML code Mark corresponding to combobox is obtained, the mark according to corresponding to the combobox gets total Options corresponding to combobox Value.Input of the designated value in combobox is realized in this case according to the Index value of acquired option value, easy to operate.
Above-mentioned Fig. 2 describes combobox designated value input method of the invention in detail, below with reference to Fig. 3 and Fig. 4, to realization The functional module and the realization combobox designated value input method of the software service of the combobox designated value input method Hardware device framework be introduced.
It should be understood that the embodiment is only purposes of discussion, do not limited by this structure in patent claim.
Embodiment three
As shown in fig.3, being the structure chart for the combobox designated value input unit that the embodiment of the present invention three provides.
In some embodiments, the combobox designated value input unit 30 is run in computer installation.The calculating Machine device is by being connected to the network electronic equipment.The combobox designated value input unit 30 may include multiple by program code Functional module composed by section.The program code of each program segment in the combobox designated value input unit 30 can store In the memory of computer installation, and as performed by least one described processor, with realization (being detailed in Fig. 2 description) combobox Designated value input.
In the present embodiment, function of the combobox designated value input unit 30 according to performed by it can be divided into Multiple functional modules.The functional module may include: determining module 301, execution module 302, execution module 302.The present invention So-called module, which refers to, a kind of performed by least one processor and can complete the series of computation of fixed function Machine program segment, storage is in memory.It in the present embodiment, will be in subsequent embodiment in detail about the function of each module It states.
Determining module 301 determines that a test script, the test script are used for the specified App in electronic equipment (Application, application program) carries out UI test.Wherein, the user interface of the App uses hypertext markup language (HyperText Markup Language, HTML) is created, and the user interface of the App includes customized combobox, institute It states combobox and corresponds to multiple option values.The test script is included in the UI test that the App is carried out defeated in the combobox Enter a designated value, the designated value is one of value in the multiple option value.
Hypertext markup language is a kind of for creating the standard markup language of webpage, and being marked by label symbol will show The various pieces in webpage shown." hypertext " just refers in the page that may include picture, link or even audio, program etc. non- Text element.The structure of hypertext markup language includes " head " part (Head) and " main body " part (Body).Wherein, " head " Part provides the information about webpage, and " main body " part provides the particular content of webpage.
In the present embodiment, the hypertext markup language can be HTML5, i.e. the 5th generation hypertext markup language. HTML5 is the newest revision version of HTML, completes standard formulation by World Wide Web Consortium (W3C) in October, 2014.HTML5's sets Counting purpose is to support multimedia on the mobile apparatus.HTML5 has some new characteristics, comprising: (1) for drawing Canvas element;(2) video the and audio element for medium playback;(3) there is better support to local offline storage; (4) new special content element, such as article, footer, header, nav, section;(5) new form controls, than Such as calendar, date, time, email, url, search.
In the present embodiment, the specified App can interact to be any with user, have visual user The application program at interface, such as can be shopping platform, audio player, image editor, game, e-book etc..
In one embodiment, the compatibility at the interface UI for testing the App can be referred to by carrying out UI test to the App Property.For example, whether test each element at the interface UI of the App can normally show under Windows operating system.At one In embodiment, each element includes, but are not limited to text, picture, audio, animation, video, hyperlink, data and inputs and connect Mouthful etc..
In one embodiment, one or more UI test cases, the test has been stored in advance in the determining module 301 Script calls the pre-stored UI test case to carry out UI test to the App.In other embodiments, the test foot This is test case in itself.
Execution module 302 controls the electronic equipment and executes the test script to carry out UI test to the App.Its In, it needs when going to when the combobox inputs the designated value, execution module 302 obtains corresponding to the combobox Total Options value.
It is described to obtain total Options value corresponding to the combobox and include:
(1) HTML code corresponding to the current user interface of the App is obtained.
In one embodiment, the execution module 302 calls function Appium getPageSource () to obtain State HTML code corresponding to the current user interface of App.
(2) the acquired HTML code of parsing, obtains the mark of the combobox.
(3) the total Options value according to corresponding to the mark of the combobox acquisition combobox.
In one embodiment, the execution module 302 parses acquired HTML code using Jsoup, obtains drop-down Total Options value corresponding to frame.The title of Jsoup is also referred to as Java HTML Parser, is the ready-made API set of JAVA Part can be used to parse the information of HTML and XML, obtain the mark of different names specified in HTML and XML, Yi Jibiao Know the content of the inside.
Execution module 302 determines the (index of Index value corresponding to each option value according to acquired total Options value Value), according to Index value corresponding to the designated value, the designated value is inputted in the combobox.
In one embodiment, the execution module 302 calls function Apiium executeScript () to come according to institute Index value corresponding to designated value is stated, inputs the designated value in the combobox to realize the input of the designated value.
For example, it is assumed that the App includes one for inputting the combobox in some time, and the combobox is corresponding All times include from 2010,2011,2012....2018 totally 9 times.The test script carries out UI test to the App When need in the combobox input the time 2017.The execution module 302 then can go to needs in test script and exist When inputting time 2017 in the combobox, function Appium getPageSource () is called to obtain the current of the App User interface corresponding to HTML code, acquired HTML code is parsed using Jsoup, to obtain the combobox Mark, according to the mark of the combobox get total Options value corresponding to the combobox (such as 2010,2011, 2012....2018 totally 9 times).The execution module 302 determines each option value institute according to acquired total Options value Corresponding Index value.For example, determining that the corresponding Index value of time 2010 is 0, the corresponding Index value of time 2011 is 1, according to This analogizes, and the corresponding Index value of time 2018 is 9.The execution module 302 is according to designated value (the i.e. time as a result, 2017) the Index value (i.e. 8) corresponding to calls function Apiium executeScript () to input institute in the combobox State designated value (i.e. time 2017).
In conclusion combobox designated value input unit described in the embodiment of the present invention, goes in UI test script It needs to obtain HTML code corresponding to current user interface when combobox inputs a designated value, parse HTML code Mark corresponding to combobox is obtained, the mark according to corresponding to the combobox gets total Options corresponding to combobox Value.Input of the designated value in combobox is realized in this case according to the Index value of acquired option value, easy to operate.
Example IV
As shown in fig.4, the structural schematic diagram of the computer installation provided for the embodiment of the present invention four.Of the invention preferable In embodiment, the computer installation 3 includes memory 31, at least one processor 32, at least one communication bus 33.It is described Computer installation 3 passes through wired or wirelessly establish communication connection with electronic equipment 4.
Those skilled in the art it should be understood that, the structure of the computer installation shown in Fig. 4 do not constitute the present invention implementation The restriction of example, either bus topology, is also possible to star structure, the computer installation 3 can also include than diagram Other more or fewer hardware perhaps software or different component layouts.
In some embodiments, the computer installation 3 includes that one kind can be according to the instruction for being previously set or storing, certainly The dynamic terminal for carrying out numerical value calculating and/or information processing, hardware include but is not limited to microprocessor, specific integrated circuit, can Program gate array, digital processing unit and embedded device etc..
It should be noted that the computer installation 3 is only for example, other electronics that are existing or being likely to occur from now on are produced Product are such as adaptable to the present invention, should also be included within protection scope of the present invention, and are incorporated herein by reference.
In some embodiments, the memory 31 is used to store program code and various data, such as is mounted on described Combobox designated value input unit 30 in computer installation 3, and realized at a high speed, certainly in the operational process of computer installation 3 The access of program or data is completed dynamicly.The memory 31 include read-only memory (Read-Only Memory, ROM), with Machine memory (Random Access Memory, RAM), programmable read only memory (Programmable Read-Only Memory, PROM), Erasable Programmable Read Only Memory EPROM (Erasable Programmable Read-Only Memory, EPROM), disposable programmable read-only memory (One-time Programmable Read-Only Memory, OTPROM), electricity Sub- erasing type can make carbon copies read-only memory (Electrically-Erasable Programmable Read-Only Memory, EEPROM), CD-ROM (Compact Disc Read-Only Memory, CD-ROM) or other disc memories, disk Memory, magnetic tape storage or any other the computer-readable medium that can be used in carrying or storing data.
In some embodiments, at least one described processor 32 can be made of integrated circuit, such as can be by single The integrated circuit of encapsulation is formed, and is also possible to be made of the integrated circuit that multiple identical functions or different function encapsulate, be wrapped Include one or more central processing unit (Central Processing unit, CPU), microprocessor, digital processing chip, The combination etc. of graphics processor and various control chips.At least one described processor 32 is the control of the computer installation 3 Core (Control Unit), using all parts of various interfaces and the entire computer installation 3 of connection, by operation or The program or module being stored in the memory 31 are executed, and calls the data being stored in the memory 31, with The various functions and processing data of computer installation 3 are executed, such as execute the function of combobox designated value input.
In some embodiments, at least one communication bus 33 is arranged to realize the memory 31 and institute State the connection communication between at least one processor 32 etc..
Although being not shown, the computer installation 3 can also include the power supply (such as battery) powered to all parts, excellent Choosing, power supply can be logically contiguous by electric power controller and at least one described processor 32, to pass through power management Device realizes the functions such as management charging, electric discharge and power managed.Power supply can also include one or more direct current or AC power source, recharging device, power failure detection circuit, power adapter or inverter, power supply status indicator etc. are appointed Meaning component.The computer installation 3 can also include multiple sensors, bluetooth module, Wi-Fi module etc., no longer go to live in the household of one's in-laws on getting married herein It states.
It should be understood that the embodiment is only purposes of discussion, do not limited by this structure in patent claim.
The above-mentioned integrated unit realized in the form of software function module, can store and computer-readable deposit at one In storage media.Above-mentioned software function module is stored in a storage medium, including some instructions are used so that a computer Device (can be server, PC etc.) or processor (processor) execute each embodiment the method for the present invention Part.
In a further embodiment, in conjunction with Fig. 3, the computer installation 3 is can be performed at least one described processor 32 Operating device and the types of applications program (combobox designated value input unit 30 as mentioned) of installation, program code etc., For example, above-mentioned modules.
Program code is stored in the memory 31, and at least one described processor 32 can call the memory 31 The program code of middle storage is to execute relevant function.For example, modules described in Fig. 3 are stored in the memory 31 In program code, and as performed by least one described processor 32, to realize the function of the modules to reach In the purpose of the combobox input designated value of the user interface of the application program 41 of electronic equipment 4.
In one embodiment of the invention, the memory 31 stores multiple instruction, the multiple instruction by it is described extremely A few processor 32 is performed to realize that the combobox in the user interface of the application program 41 of electronic equipment 4 inputs designated value Purpose.
Specifically, at least one described processor 32 can refer to the corresponding implementation of Fig. 2 to the concrete methods of realizing of above-metioned instruction The description of correlation step in example, this will not be repeated here.
In several embodiments provided by the present invention, it should be understood that arriving, disclosed device, device and method can To realize by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the module Division, only a kind of logical function partition, there may be another division manner in actual implementation.
The module as illustrated by the separation member may or may not be physically separated, aobvious as module The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.Some or all of the modules therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
It, can also be in addition, each functional module in each embodiment of the present invention can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds software function module.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims Variation is included in the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.This Outside, it is clear that one word of " comprising " is not excluded for other units or, odd number is not excluded for plural number.The multiple units stated in device claim Or device can also be implemented through software or hardware by a unit or device.The first, the second equal words are used to indicate name Claim, and does not indicate any particular order.
Finally it should be noted that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting, although reference Preferred embodiment describes the invention in detail, those skilled in the art should understand that, it can be to of the invention Technical solution is modified or equivalent replacement, without departing from the spirit and scope of the technical solution of the present invention.

Claims (11)

1. a kind of combobox designated value input method, which is characterized in that the described method includes:
Controlling electronic devices executes test script and carries out UI test to specified App, wherein the user interface of the App includes Customized combobox, the combobox correspond to multiple option values;
It needs to obtain total Options value corresponding to the combobox when the combobox inputs designated value when going to;
Index value corresponding to each option value is determined according to acquired total Options value;And
According to Index value corresponding to the designated value, the designated value is inputted in the combobox.
2. combobox designated value input method as described in claim 1, which is characterized in that the acquisition combobox institute is right The total Options value answered includes:
Obtain HTML code corresponding to the current user interface of the App;
The acquired HTML code of parsing, obtains the mark of the combobox;And
According to total Options value corresponding to the mark of the combobox acquisition combobox.
3. combobox designated value input method as claimed in claim 2, which is characterized in that described to obtain the current of the App User interface corresponding to HTML code include:
Function Appium getPageSource () is called to obtain HTML generation corresponding to the current user interface of the App Code.
4. combobox designated value input method as claimed in claim 2, which is characterized in that HTML generation acquired in the parsing Code, the mark for obtaining the combobox include:
The HTML code for calling Jsoup parsing acquired, obtains the mark of the combobox.
5. combobox designated value input method as described in claim 1, which is characterized in that described right according to the designated value institute The Index value answered, the designated value is inputted in the combobox includes:
Function Apiium executeScript () Index value according to corresponding to the designated value is called, in the combobox The middle input designated value.
6. combobox designated value input method as described in claim 1, which is characterized in that the user interface of the App uses Hypertext markup language is created.
7. combobox designated value input method as described in claim 1, which is characterized in that the electronic equipment is mobile phone, puts down Plate computer, smart television or wearable device.
8. combobox designated value input method as described in claim 1, which is characterized in that the test script calling is deposited in advance The UI test case of storage carries out UI test to the App.
9. a kind of computer installation, which is characterized in that the computer installation includes processor, and the processor is deposited for executing The combobox designated value input method as described in any one of claim 1 to 7 is realized when the computer program stored in reservoir.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The combobox designated value input method as described in any one of claim 1 to 7 is realized when being executed by processor.
11. a kind of combobox designated value input unit, which is characterized in that described device includes:
Execution module executes test script for controlling electronic devices and carries out UI test to specified App, wherein the App's User interface includes customized combobox, and the combobox corresponds to multiple option values;
The execution module is also used to obtain the combobox institute when going to needs when the combobox inputs designated value Corresponding total Options value;
The execution module is also used to determine Index value corresponding to each option value according to acquired total Options value;And
The execution module is also used to the Index value according to corresponding to the designated value, the finger is inputted in the combobox Definite value.
CN201811238680.5A 2018-10-23 2018-10-23 Combobox designated value input method, device and computer readable storage medium Pending CN109634492A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811238680.5A CN109634492A (en) 2018-10-23 2018-10-23 Combobox designated value input method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811238680.5A CN109634492A (en) 2018-10-23 2018-10-23 Combobox designated value input method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109634492A true CN109634492A (en) 2019-04-16

Family

ID=66066558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811238680.5A Pending CN109634492A (en) 2018-10-23 2018-10-23 Combobox designated value input method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109634492A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110543270A (en) * 2019-08-02 2019-12-06 苏州浪潮智能科技有限公司 Method and system for simultaneously inputting multiple drop-down selection boxes in page form

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120216132A1 (en) * 2011-02-21 2012-08-23 International Business Machines Corporation Embedding User Selected Content In A Web Browser Display
CN104484269A (en) * 2014-11-27 2015-04-01 北京广利核系统工程有限公司 Method for automatically generating testing script
CN104731566A (en) * 2013-12-19 2015-06-24 华为软件技术有限公司 Testing device, method and system for IDE (Integrated Development Environment)
CN104794050A (en) * 2014-01-21 2015-07-22 腾讯科技(深圳)有限公司 Application program test method, device and system
CN105653441A (en) * 2014-11-21 2016-06-08 中国科学院声学研究所 Method and system for UI traversal testing
CN105843734A (en) * 2016-03-18 2016-08-10 厦门美图移动科技有限公司 Automatic test method and device and computing device
CN106528512A (en) * 2016-10-12 2017-03-22 国脉科技股份有限公司 EXCEL preliminary budget table automatic compiling method
CN108536593A (en) * 2018-04-02 2018-09-14 泰华智慧产业集团股份有限公司 CS Framework Softwares automated testing method based on UI and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120216132A1 (en) * 2011-02-21 2012-08-23 International Business Machines Corporation Embedding User Selected Content In A Web Browser Display
CN104731566A (en) * 2013-12-19 2015-06-24 华为软件技术有限公司 Testing device, method and system for IDE (Integrated Development Environment)
CN104794050A (en) * 2014-01-21 2015-07-22 腾讯科技(深圳)有限公司 Application program test method, device and system
CN105653441A (en) * 2014-11-21 2016-06-08 中国科学院声学研究所 Method and system for UI traversal testing
CN104484269A (en) * 2014-11-27 2015-04-01 北京广利核系统工程有限公司 Method for automatically generating testing script
CN105843734A (en) * 2016-03-18 2016-08-10 厦门美图移动科技有限公司 Automatic test method and device and computing device
CN106528512A (en) * 2016-10-12 2017-03-22 国脉科技股份有限公司 EXCEL preliminary budget table automatic compiling method
CN108536593A (en) * 2018-04-02 2018-09-14 泰华智慧产业集团股份有限公司 CS Framework Softwares automated testing method based on UI and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
叁藏法师: ""自动化测试基础篇--Selenium select下拉框"", 《HTTPS://WWW.CNBLOGS.COM/SANZANGTST/P/7681523.HTML》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110543270A (en) * 2019-08-02 2019-12-06 苏州浪潮智能科技有限公司 Method and system for simultaneously inputting multiple drop-down selection boxes in page form
CN110543270B (en) * 2019-08-02 2020-11-10 苏州浪潮智能科技有限公司 Method and system for simultaneously inputting multiple drop-down selection boxes in page form
US11500521B2 (en) 2019-08-02 2022-11-15 Inspur Suzhou Intelligent Technology Co., Ltd. Page form, and method and system for simultaneously inputting plurality of pull-down menus

Similar Documents

Publication Publication Date Title
CN106873991B (en) Page generation method and device
CN103714115B (en) The loading method and device of a kind of web page contents
EP2840487A1 (en) Systems, methods, and software to present human machine interfaces on a mobile device
CN105335132B (en) Method, device and system for customizing application program function
CN103927190A (en) Network expression downloading method and device
CN103699635B (en) Information processing method and device
CN109542758A (en) Application program fault-tolerant ability test method, device, computer readable storage medium
CN110554874A (en) Method and device for reusing webpage components of SaaS platform
CN109828905A (en) Automated testing method, device, computer installation and storage medium
US10908930B2 (en) Hybrid interactivity in JavaScript webpage user interfaces
CN110244985A (en) A kind of view rendering method, computer storage medium and terminal device
CN103064958A (en) Method for automatic recognition and analysis of browser and based on hyper text makeup language (HTML) 5 video label
CN109766271A (en) Automated testing method, device, electronic equipment and storage medium are applied in mixing
US20240045879A1 (en) Presentation method, apparatus and electronic device
CN106446116A (en) Business rule parameter interaction method and business rule parameter interaction device applied to rule engine
CN111651700A (en) Message display method and device, electronic equipment and storage medium
CN115935925A (en) Form adapting method, electronic device and computer readable storage medium
CN106161656B (en) Interface jumping method and device
CN110851211A (en) Method, apparatus, electronic device, and medium for displaying application information
CN109634492A (en) Combobox designated value input method, device and computer readable storage medium
CN109840189A (en) Caton formation gathering method, device, computer installation and readable storage medium storing program for executing
CN102929845B (en) A kind of server and method for realizing network reading
CN112306622B (en) Construction method and device of VNF template
CN103927197A (en) Method And Apparatus For Executing Application Program In Electronic Device
CN114489910B (en) Video conference data display method, device, equipment and 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190416