@@ -14,10 +14,10 @@ def setUp(self):
1414 self .base_url = " "
1515 self .verificationErrors = []
1616 self .accept_next_alert = True
17-
17+
1818 def test_give_list2 (self ):
1919 driver = self .driver
20- driver .get (self .base_url + "file:///home/matthew/Documents/Y4/CAL/FSM%20Prototype /Deploy/inf1/give-list-2.html" )
20+ driver .get (self .base_url + "file:///home/matthew/Documents/Y4/CAL/FSM/Deploy/inf1/give-list-2.html" )
2121 driver .find_element_by_id ("check-button" ).click ()
2222 # ERROR: Caught exception [Error: locator strategy either id or name must be specified explicitly.]
2323 driver .find_element_by_id ("1" ).click ()
@@ -38,17 +38,17 @@ def test_give_list2(self):
3838 driver .find_element_by_id ("check-button" ).click ()
3939 # ERROR: Caught exception [Error: locator strategy either id or name must be specified explicitly.]
4040 # ERROR: Caught exception [Error: locator strategy either id or name must be specified explicitly.]
41-
41+
4242 def is_element_present (self , how , what ):
4343 try : self .driver .find_element (by = how , value = what )
4444 except NoSuchElementException as e : return False
4545 return True
46-
46+
4747 def is_alert_present (self ):
4848 try : self .driver .switch_to_alert ()
4949 except NoAlertPresentException as e : return False
5050 return True
51-
51+
5252 def close_alert_and_get_its_text (self ):
5353 try :
5454 alert = self .driver .switch_to_alert ()
@@ -59,7 +59,7 @@ def close_alert_and_get_its_text(self):
5959 alert .dismiss ()
6060 return alert_text
6161 finally : self .accept_next_alert = True
62-
62+
6363 def tearDown (self ):
6464 self .driver .quit ()
6565 self .assertEqual ([], self .verificationErrors )
0 commit comments