Update README.md
HDriver包括两部分UiTestAPP和PythonClient,UiTestAPP是ArkTS语言开发的测试APP,其在鸿蒙端启动一个SocketServer,接收PythonClient的指令,执行APP启停、元素查找、点击、滑动等操作,并返回结果。这是一个鸿蒙系统UI测试的端到端测试方案,具备通用设备测试能力。UiTestAPP基于鸿蒙系统提供的“@ohos.UiTest”模块。
hdriver = HDriver(【鸿蒙设备ID】, 【APP Bundle】, 【APP Ability】)
获取屏幕尺寸:
hdriver.get_screen_size()
w, h = size_dict[“width”], size_dict[“height”]
滑动:
hdriver.swipe(w/2, h0.8, w/2, h0.2, 1)
根据坐标点击:
hdriver.tap(w/2, h/2)
回退:
hdriver.back()
返回桌面:
hdriver.home()
元素查找:
hdriver.find_element(“text”, “蓝牙”, timeout_s=15)
HDriver is released under the Apache License 2.0.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
HDriver
HDriver包括两部分UiTestAPP和PythonClient,UiTestAPP是ArkTS语言开发的测试APP,其在鸿蒙端启动一个SocketServer,接收PythonClient的指令,执行APP启停、元素查找、点击、滑动等操作,并返回结果。这是一个鸿蒙系统UI测试的端到端测试方案,具备通用设备测试能力。UiTestAPP基于鸿蒙系统提供的“@ohos.UiTest”模块。
特点
使用说明
hdriver = HDriver(【鸿蒙设备ID】, 【APP Bundle】, 【APP Ability】)
获取屏幕尺寸:
hdriver.get_screen_size()
w, h = size_dict[“width”], size_dict[“height”]
滑动:
hdriver.swipe(w/2, h0.8, w/2, h0.2, 1)
根据坐标点击:
hdriver.tap(w/2, h/2)
回退:
hdriver.back()
返回桌面:
hdriver.home()
元素查找:
hdriver.find_element(“text”, “蓝牙”, timeout_s=15)
License
HDriver is released under the Apache License 2.0.