summaryrefslogtreecommitdiff
path: root/yaksh/live_server_tests/selenium_test.py
diff options
context:
space:
mode:
authorprathamesh2017-08-17 16:44:59 +0530
committerprathamesh2017-08-18 16:58:44 +0530
commitdd617ed43eb67cc6879605c05eaaad99d377e0cc (patch)
treebca824844e429570d0144885e11560e053e4802a /yaksh/live_server_tests/selenium_test.py
parent72311dbcda3689c46bc6f5e9b68d4a14ec7b161f (diff)
downloadonline_test-dd617ed43eb67cc6879605c05eaaad99d377e0cc.tar.gz
online_test-dd617ed43eb67cc6879605c05eaaad99d377e0cc.tar.bz2
online_test-dd617ed43eb67cc6879605c05eaaad99d377e0cc.zip
Added 8 seconds sleep in selenium test for now.
As implicit wait is not functioning as desired. Added sleep for now. Since new exam interface has AJAX request response, so interface sets a blank div on top of all divs to prevent further events till a response is received. So selenium does not get the required HTML element at that period. And 8 seconds because for infinite loop server responds after 4 seconds.
Diffstat (limited to 'yaksh/live_server_tests/selenium_test.py')
-rw-r--r--yaksh/live_server_tests/selenium_test.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/yaksh/live_server_tests/selenium_test.py b/yaksh/live_server_tests/selenium_test.py
index 277f08e..00e1847 100644
--- a/yaksh/live_server_tests/selenium_test.py
+++ b/yaksh/live_server_tests/selenium_test.py
@@ -7,6 +7,7 @@ from selenium.common.exceptions import WebDriverException
import multiprocessing
import argparse
+import time
class SeleniumTestError(Exception):
pass
@@ -48,6 +49,7 @@ class SeleniumTest():
def submit_answer(self, question_label, answer, loop_count=1):
self.driver.implicitly_wait(2)
for count in range(loop_count):
+ time.sleep(15)
self.driver.find_element_by_link_text(question_label).click()
submit_answer_elem = self.driver.find_element_by_id("check")
self.driver.execute_script('global_editor.editor.setValue({});'.format(answer))