Permalink
Browse files

replace find_element_by_name with accessibility id

* fix bug

* change find element method to by_accessibility_id

* reset ios platform version
1 parent c46d2b8 commit e23f03ac44ed861d68d02e08a8e3ecc5291f0122 @MarlonFan MarlonFan committed with jlipps Nov 4, 2016
Showing with 3 additions and 3 deletions.
  1. +3 −3 sample-code/examples/python/ios_simple.py
@@ -26,8 +26,8 @@ def tearDown(self):
def _populate(self):
# populate text fields with two random numbers
- els = [self.driver.find_element_by_name('TextField1'),
- self.driver.find_element_by_name('TextField2')]
+ els = [self.driver.find_element_by_accessibility_id('TextField1'),
+ self.driver.find_element_by_accessibility_id('TextField2')]
self._sum = 0
for i in range(2):
@@ -44,7 +44,7 @@ def test_ui_computation(self):
# is sum equal ?
# sauce does not handle class name, so get fourth element
- sum = self.driver.find_element_by_name('Answer').text
+ sum = self.driver.find_element_by_accessibility_id('Answer').text
self.assertEqual(int(sum), self._sum)
def test_scroll(self):

0 comments on commit e23f03a

Please sign in to comment.