Skip to content

Commit

Permalink
iOS seems to be fixed with appium1.6.4 and Xcode 8.3, normalize was c…
Browse files Browse the repository at this point in the history
…ausing problems, removed
  • Loading branch information
serhatbolsu committed Oct 28, 2017
1 parent 1fac770 commit d2fc3db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions AppiumLibrary/keywords/_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,11 +562,7 @@ def _element_input_value_by_locator(self, locator, text):
def _element_find(self, locator, first_only, required, tag=None):
application = self._current_application()
if isstr(locator):
# Normalize any unicode as explained here, http://appium.io/slate/en/master/?javascript#multi-lingual-support
if self._get_platform() == 'ios':
_locator = normalize('NFD', locator)
else:
_locator = locator
_locator = locator
elements = self._element_finder.find(application, _locator, tag)
if required and len(elements) == 0:
raise ValueError("Element locator '" + locator + "' did not match any elements.")
Expand All @@ -586,15 +582,15 @@ def _element_find_by_text(self, text, exact_match=False):
return element
else:
if exact_match:
_xpath = '//*[@value="{}" or @label="{}"]'.format(text, text)
_xpath = u'//*[@value="{}" or @label="{}"]'.format(text, text)
else:
_xpath = '//*[contains(@label,"{}") or contains(@value, "{}")]'.format(text, text)
_xpath = u'//*[contains(@label,"{}") or contains(@value, "{}")]'.format(text, text)
return self._element_find(_xpath, True, True)
elif self._get_platform() == 'android':
if exact_match:
_xpath = '//*[@{}="{}"]'.format('text', text)
_xpath = u'//*[@{}="{}"]'.format('text', text)
else:
_xpath = '//*[contains(@{},"{}")]'.format('text', text)
_xpath = u'//*[contains(@{},"{}")]'.format('text', text)
return self._element_find(_xpath, True, True)

def _get_text(self, locator):
Expand Down
2 changes: 1 addition & 1 deletion AppiumLibrary/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-

VERSION = '1.4.5.5'
VERSION = '1.4.5.6'

0 comments on commit d2fc3db

Please sign in to comment.