Linux下如何对GUI进行自动化测试?
如何对控件进行定位?
有哪些自动化测试框架?
实现原理是什么?
例如:
dogtail 使用AT-SPI
sikuli 使用图片定位
阿神2017-04-17 13:33:40
AT-SPI
dogtail
https://fedorahosted.org/dogtail/
dogtail is generally good, but there are many pitfalls. For example, the window will not be brought to the front during operation, resulting in Unable to operate the control. Traversing the control is too slow...
ldtp
https://wiki.freedesktop.org/ldtp/
ldtp has no obvious pitfalls, but the returned control does not have a tree structure. So If the position of the control changes, it will be very troublesome to operate.
OpenCV (screen image/color search)
Sikuli
http://www.sikuli.org/
General, slow.
Note:
Most operations can be completed using AT-SPI, but many custom controls in other desktop environments except Gnome cannot be controlled (for example: the transparent buttons that pop up when Ubuntu is shut down cannot be obtained). Moreover, traversing controls is relatively slow. .
AT-SPI API is an API to help people with visual impairments, and is mostly used to implement screen reading software.
OpenCV is more versatile, but slower. And it is not robust and easy to find.
(Since no one has answered, I will give it a try)