Skip to content

Commit c6f58bc

Browse files
authored
fix base64 encoded string (#231)
1 parent 3ad2b41 commit c6f58bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

appium/webdriver/webdriver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def find_element_by_image(self, png_img_path,
355355
"""
356356
screenshot = self.get_screenshot_as_base64()
357357
with open(png_img_path, 'rb') as png_file:
358-
b64_data = base64.encodestring(png_file.read())
358+
b64_data = base64.b64encode(png_file.read()).decode('UTF-8')
359359
try:
360360
res = self.find_image_occurrence(screenshot, b64_data,
361361
threshold=match_threshold)

0 commit comments

Comments
 (0)