Skip to content

Commit

Permalink
fix base64 encoded string (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Jul 13, 2018
1 parent 3ad2b41 commit c6f58bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion appium/webdriver/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def find_element_by_image(self, png_img_path,
"""
screenshot = self.get_screenshot_as_base64()
with open(png_img_path, 'rb') as png_file:
b64_data = base64.encodestring(png_file.read())
b64_data = base64.b64encode(png_file.read()).decode('UTF-8')
try:
res = self.find_image_occurrence(screenshot, b64_data,
threshold=match_threshold)
Expand Down

0 comments on commit c6f58bc

Please sign in to comment.