@@ -22,6 +22,8 @@ class ComplexIOSTests(unittest.TestCase):
2222
2323 def setUp (self ):
2424 # set up appium
25+ # ** Important Note **
26+ # Make sure you have build the UICatalog applcation in your local repository
2527 app = os .path .join (os .path .dirname (__file__ ),
2628 '../../apps/UICatalog/build/Release-iphonesimulator' ,
2729 'UICatalog.app' )
@@ -31,7 +33,7 @@ def setUp(self):
3133 desired_capabilities = {
3234 'app' : app ,
3335 'platformName' : 'iOS' ,
34- 'platformVersion' : '8.1 ' ,
36+ 'platformVersion' : '8.3 ' ,
3537 'deviceName' : 'iPhone 6'
3638 })
3739 self ._values = []
@@ -55,7 +57,7 @@ def test_find_element(self):
5557 self .assertEqual (18 , len (rows ))
5658
5759 # is first one about buttons
58- self .assertEqual (rows [0 ].get_attribute ("name" ), "Action Sheets, AAPLActionSheetViewController " )
60+ self .assertEqual (rows [0 ].get_attribute ("name" ), "Action Sheets" )
5961
6062 # there is nav bar inside the app
6163 nav_bar = self .driver .find_element_by_class_name ("UIANavigationBar" )
@@ -72,7 +74,7 @@ def test_frames(self):
7274
7375 # Find the store link
7476 sleep (4 ) # let the page load, perhaps
75- logo = self .driver .find_element_by_id ( 'gn- apple' )
77+ logo = self .driver .find_element_by_xpath ( '//*/UIATextField[@value="http:// apple.com"] ' )
7678 self .assertIsNotNone (logo )
7779
7880 # leave the webview
@@ -86,7 +88,7 @@ def test_location(self):
8688 # get third row location
8789 row = self .driver .find_elements_by_class_name ("UIATableCell" )[2 ]
8890 self .assertEqual (row .location ['x' ], 0 )
89- self .assertEqual (row .location ['y' ], 152 )
91+ self .assertEqual (row .location ['y' ], 178.8125 )
9092
9193 def test_screenshot (self ):
9294 # make screenshot and get is as base64
@@ -121,7 +123,7 @@ def test_text_field_edit(self):
121123
122124 def test_alert_interaction (self ):
123125 # go to the alerts section
124- self .driver .find_element_by_name ('Alert Views, AAPLAlertViewController ' ).click ()
126+ self .driver .find_element_by_name ('Alert Views' ).click ()
125127 triggerOk = self .driver .find_element_by_accessibility_id ("Simple" )
126128
127129 # TOFIX: Looks like alert object is not proper state
@@ -167,7 +169,7 @@ def test_source(self):
167169 # get main view soruce
168170 source_main = self .driver .page_source
169171 self .assertIn ("UIATableView" , source_main )
170- self .assertIn ("Text Fields, AAPLTextFieldViewController " , source_main )
172+ self .assertIn ("Text Fields" , source_main )
171173
172174 # got to text fields section
173175 self ._open_menu_position (13 )
0 commit comments