Skip to content

Commit

Permalink
修改识别工具引入的位置
Browse files Browse the repository at this point in the history
  • Loading branch information
yanchunhuo committed Oct 27, 2022
1 parent 0d8fc43 commit 10f3a54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/appium/appOperator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from appium.webdriver.webelement import WebElement
from common.dateTimeTool import DateTimeTool
from common.httpclient.doRequest import DoRequest
from common.captchaRecognitionTool import CaptchaRecognitionTool
from page_objects.createElement import CreateElement
from page_objects.app_ui.locator_type import Locator_Type
from page_objects.app_ui.wait_type import Wait_Type as Wait_By
Expand Down Expand Up @@ -361,12 +360,13 @@ def save_element_image(self,element,image_file_name):

def get_captcha(self,element,language='eng'):
"""
识别图片验证码
识别图片验证码,如需使用该方法必须配置jpype1、字体库等依赖环境
:param element: 验证码图片元素
:param language: eng:英文,chi_sim:中文
:return:
"""
# 识别图片验证码
from common.captchaRecognitionTool import CaptchaRecognitionTool
captcha_image_file_name=self.save_element_image(element,'captcha')
captcha=CaptchaRecognitionTool.captchaRecognition(captcha_image_file_name,language)
captcha=captcha.strip()
Expand Down

0 comments on commit 10f3a54

Please sign in to comment.