Skip to content

Commit 31b97d0

Browse files
committed
Remaining find_elements_by changed
1 parent 4206f63 commit 31b97d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

AppiumLibrary/locators/elementfinder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def find(self, application, locator, tag=None):
4242
# Strategy routines, private
4343

4444
def _find_by_identifier(self, application, criteria, tag, constraints):
45-
elements = self._normalize_result(application.find_elements_by_id(criteria))
46-
elements.extend(self._normalize_result(application.find_elements_by_name(criteria)))
45+
elements = self._normalize_result(application.find_elements(by=AppiumBy.ID, value=criteria))
46+
elements.extend(self._normalize_result(application.find_elements(by=AppiumBy.NAME, value=criteria)))
4747
return self._filter_elements(elements, tag, constraints)
4848

4949
def _find_by_id(self, application, criteria, tag, constraints):
@@ -174,7 +174,7 @@ def _find_by_key_attrs(self, application, criteria, tag, constraints):
174174
xpath_tag,
175175
' and '.join(xpath_constraints) + ' and ' if len(xpath_constraints) > 0 else '',
176176
' or '.join(xpath_searchers))
177-
return self._normalize_result(application.find_elements_by_xpath(xpath))
177+
return self._normalize_result(application.find_elements(by=AppiumBy.XPATH, value=xpath))
178178

179179
# Private
180180
_key_attrs = {

0 commit comments

Comments
 (0)