UI (user interface) automated testing method, device, electronic equipment and storage medium
An automated testing and user interface technology, applied in the fields of devices, electronic equipment, user interface automated testing methods, and storage media, can solve problems such as heavy workload and inability to realize the popularity and efficiency of UI automated testing, so as to improve reusability and realize Script sharing, realizing the effect of cross-boundary calling
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
example 1
[0046] Example 1: Call a method without reference, such as the click() method under the Button class.
[0047] First, the Button type definition (stored in the control library) is as follows:
[0048]
[0049] The element parsing module 103 implements calling through the following code:
[0050] String className="UIElement."+bean.getType(); / / The bean object is the processed DB data set passed in above, the getType here is the name of the Class, which refers to Button in this example
[0051] demo = Class. forName(className);
[0052] Method method=demo.getMethod(bean.getAction()); / / getAction is the name of the method, in this example it refers to click
[0053] method.invoke(demo.getConstructor(String.class,String.class,Finder.class,String.class,WebDriver.class) / / This part is the construction method of instantiating Button
[0054] .newInstance(bean.getiFrame(), bean.getPlatform(),
[0055] Finder.valueOf(bean.getFinder()), bean.getFinderValue(), driver)); / / Through refl...
example 2
[0057] Example 2: Call a method with one parameter, for example: the setValue(Stringvalue) method under the TextField class, which accepts a parameter value of String type
[0058] The element parsing module 103 implements calling through the following code:
[0059] String className="UIElement."+bean.getType(); / / GetType is the name of the Class, in this example it refers to TextField
[0060] demo = Class. forName(className);
[0061] Method method = demo.getMethod(bean.getAction(),String.class); / /
[0062] String.class is the parameter type of the required input parameter, defined here as String
[0063] method.invoke(demo.getConstructor(String.class,String.class,Finder.class,String.class,WebDriver.class)
[0064] .newInstance(bean.getiFrame(), bean.getPlatform(),
[0065] Finder.valueOf(bean.getFinder()),bean.getFinderValue(),driver),
[0066] bean.getValue()); / / Call the setValue method, and get the real value from the business through bean.getValue
[0067] The meth...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com