def tu():
browser.get_screenshot_as_file('1.png')
img = Image.open("1.png")
bo = ('图片左边到元素左边的距离','图片上面到元素上边的距离','图片左边到元素最右边的距离','图片上面到元素最下边的距离')
bo= (536,366,660,417)
im = img.crop(bo)
im.save('1.png')
tu.screenshot('1.png')#指定元素截图
APP_ID = '......'
API_KEY = '..............'
SECRET_KEY = '....................'
client = AipOcr(APP_ID, API_KEY, SECRET_KEY)
image =open('1.png','rb')
image = image.read()
word = client.basicAccurate(image)
return word['words_result']