def test_max_attempts(self): """ Verifies that the Submit button disables when the max number of attempts is reached. """ self.courseware_page.visit() problem_page = ProblemPage(self.browser) # Submit first answer (correct) problem_page.click_choice("choice_2") self.assertFalse(problem_page.is_submit_disabled()) problem_page.click_submit() problem_page.wait_success_notification() # Submit second and final answer (incorrect) problem_page.click_choice("choice_1") problem_page.click_submit() problem_page.wait_incorrect_notification() # Make sure that the Submit button disables. problem_page.wait_for_submit_disabled()
def test_max_attempts(self): """ Verifies that the Submit button disables when the max number of attempts is reached. """ self.courseware_page.visit() problem_page = ProblemPage(self.browser) # Submit first answer (correct) problem_page.click_choice("choice_2") self.assertFalse(problem_page.is_submit_disabled()) problem_page.click_submit() problem_page.wait_success_notification() # Submit second and final answer (incorrect) problem_page.click_choice("choice_1") problem_page.click_submit() problem_page.wait_incorrect_notification() # Make sure that the Submit button disables. problem_page.wait_for_submit_disabled()