diff options
author | prathamesh | 2017-09-01 17:22:29 +0530 |
---|---|---|
committer | prathamesh | 2017-09-01 17:22:29 +0530 |
commit | 1e3bb9e325214be0105f8b907badc84b2dbbeb91 (patch) | |
tree | 3327924e1879524909d5f1603dfe7d3dbda4c05a /yaksh/live_server_tests/selenium_test.py | |
parent | e2c65655dcdc5558cfb4ab668c3012024d27ac75 (diff) | |
parent | 9e0f737c25a5156aa884d27357af0aef1145c4b7 (diff) | |
download | online_test-1e3bb9e325214be0105f8b907badc84b2dbbeb91.tar.gz online_test-1e3bb9e325214be0105f8b907badc84b2dbbeb91.tar.bz2 online_test-1e3bb9e325214be0105f8b907badc84b2dbbeb91.zip |
Merge branch 'master' of https://github.com/FOSSEE/online_test into improve-code-server
Conflicts Resolved:
yaksh/templates/yaksh/question.html
Diffstat (limited to 'yaksh/live_server_tests/selenium_test.py')
-rw-r--r-- | yaksh/live_server_tests/selenium_test.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/yaksh/live_server_tests/selenium_test.py b/yaksh/live_server_tests/selenium_test.py index 21a9e42..31efcac 100644 --- a/yaksh/live_server_tests/selenium_test.py +++ b/yaksh/live_server_tests/selenium_test.py @@ -37,6 +37,7 @@ class SeleniumTest(): self.driver.get(self.url) self.login(username, password) self.open_quiz() + self.quit_quiz() self.close_quiz() self.logout() self.driver.close() @@ -127,9 +128,20 @@ class SeleniumTest(): ) start_exam_elem.click() - self.test_c_question(question_label=2) - self.test_python_question(question_label=3) - self.test_bash_question(question_label=1) + self.test_c_question(question_label=7) + self.test_python_question(question_label=5) + self.test_bash_question(question_label=4) + + def quit_quiz(self): + quit_link_elem = WebDriverWait(self.driver, 5).until( + EC.presence_of_element_located((By.NAME, "quit")) + ) + quit_link_elem.click() + + quit_link_elem = WebDriverWait(self.driver, 5).until( + EC.presence_of_element_located((By.NAME, "yes")) + ) + quit_link_elem.click() def close_quiz(self): quit_link_elem = WebDriverWait(self.driver, 5).until( |