起因
因为要测试的iOS app用appium定位不了元素,所以就用网易的aircv开源库,通过图像识别找到需要查找的图片的坐标,然后通过tap的方法来点击该坐标。
def get_coordinate_by_image_identify(self, imgsch):
"""
通过图像识别来查找待查找图片的坐标
:param imgsch: 待查找图片
:return: x, y轴坐标
"""
try:
time.sleep(0.5)
self.driver.save_screenshot(CONST