diff options
author | mahesh | 2017-09-01 16:43:11 +0530 |
---|---|---|
committer | mahesh | 2017-09-01 16:43:11 +0530 |
commit | e8eca566edde7b330a92af91541cee5d348a0326 (patch) | |
tree | a996fa48ebdfd56b14451dc57d413f03f25a4237 /yaksh/live_server_tests/selenium_test.py | |
parent | f308f6e4ffb3fefc42552570fd8cf852d643cd6f (diff) | |
parent | 9e0f737c25a5156aa884d27357af0aef1145c4b7 (diff) | |
download | online_test-e8eca566edde7b330a92af91541cee5d348a0326.tar.gz online_test-e8eca566edde7b330a92af91541cee5d348a0326.tar.bz2 online_test-e8eca566edde7b330a92af91541cee5d348a0326.zip |
Merge branch 'master' of https://github.com/fossee/online_test into add_tag_search
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 277f08e..bc400fd 100644 --- a/yaksh/live_server_tests/selenium_test.py +++ b/yaksh/live_server_tests/selenium_test.py @@ -23,6 +23,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() @@ -111,9 +112,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( |