diff options
author | Prabhu Ramachandran | 2017-08-25 08:40:58 +0530 |
---|---|---|
committer | GitHub | 2017-08-25 08:40:58 +0530 |
commit | 9e0f737c25a5156aa884d27357af0aef1145c4b7 (patch) | |
tree | 53ad33f61c239271f62ee2054ad79cb76688645d /yaksh/live_server_tests/selenium_test.py | |
parent | 9d5c4a01fd7856f1ef8793b75a9734324c254344 (diff) | |
parent | 30b48c30abebf75ed4b51fd034600e0c7d58c95b (diff) | |
download | online_test-9e0f737c25a5156aa884d27357af0aef1145c4b7.tar.gz online_test-9e0f737c25a5156aa884d27357af0aef1145c4b7.tar.bz2 online_test-9e0f737c25a5156aa884d27357af0aef1145c4b7.zip |
Merge pull request #312 from maheshgudi/yaml_questions
Yaml serialized questions
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( |