From 4ae9d2e8963eb6b48cb28cbf5c58b07fde80f946 Mon Sep 17 00:00:00 2001 From: serhatbolsu Date: Thu, 13 Oct 2016 16:55:10 +0300 Subject: [PATCH] Fix unicode support for `click text` --- src/AppiumLibrary/keywords/_element.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AppiumLibrary/keywords/_element.py b/src/AppiumLibrary/keywords/_element.py index d28fcfcc..d2d95fd3 100644 --- a/src/AppiumLibrary/keywords/_element.py +++ b/src/AppiumLibrary/keywords/_element.py @@ -61,11 +61,11 @@ def click_text(self, text, exact_match=False): """ _platform_class_dict = {'ios': 'name', 'android': 'text'} if exact_match: - _xpath = '//*[@{}="{}"]'.format( + _xpath = u'//*[@{}="{}"]'.format( _platform_class_dict.get(self._get_platform()), text) else: - _xpath = '//*[contains(@{},"{}")]'.format( + _xpath = u'//*[contains(@{},"{}")]'.format( _platform_class_dict.get(self._get_platform()), text) self._element_find(_xpath, True, True).click()