Macacauifinder element Finder 1. What is it?
- This is a javaswing write Macaca element Finder, easy to test the small partners to locate elements, if you feel good, also please point a star encouragement, hey.
Address: Github.com/matrixseven/macacauifinder
2. For what?
- In order to resolve the
app-inspector
element found on, not one time in Java to start Macaca (the process of starting link macacaserver) positioning element is slow, sometimes an element location failed,
Close macaca-server
, then start app-inspector
, locate the element, and then switch to macaca-server
. I recommend starting app-inspector
a lot of things here.
Browser tab page, the need to locate the elements of the page is opened in the tab, and then open the software once looking for elements, confirm the correct copy of the available positioning string, directly in the Java test case, instead of
For an element that is not positioned to restart repeatedly Macaca-client(启动链接是一个非常耗时的动作)
.
And for what? For my girlfriend ... Also in order to struggle with the small partners in automated UI testing.
3. Why the code is so low.
No way, the code almost a day to write out of time. And swing's layout is 恶心
, originally wanted to use JavaFX, but did not find good information, but after writing found a TornadoFX
, with
Kotlin writing a DSL is really working. You can try it.
4. Configuration file format
- Refer to the JSON field in the official demo to fill in the Sample-java
[ { "name":"iphoneX", "deviceName":"iPhone X", "bundleId":"测试包bundleId", "udid":"真实设备的udid", "platformName":"iOS" }, { "name":"小米8", "deviceName":"xiaomi 8", "app": "apk下载路径", "udid":"真实设备的udid", "platformName":"android" }]
5. Start the command
Direct git clone
this project or download MacacaElementUI-1.0.jar
and then directly java -jar MacacaElementUI-1.0.jar
execute 食用
the software.
6. About Design
- Although very low, but overall there is a design to find
In order to avoid nesting at the time of writing this UI, the event publish subscription mode is used, each trigger a button/component,
The event manager is released, and then the event manager distributes the event to the corresponding
Subscribers, thus completing the processing of ui/events and separating them from each other JComponent
.
7. Actual effect
Configuration page
Execution page
8. Tips
- The software may have an unknown bug.
- Currently in the test phase, do not spray.
Author: acceleratoremail:hacker.kill07@gmail.com I love Java (QQ Group): 170936712 (click to join)