summaryrefslogtreecommitdiff
path: root/yaksh/live_server_tests/selenium_test.py
diff options
context:
space:
mode:
authorprathamesh2017-09-01 16:51:37 +0530
committerprathamesh2017-09-01 16:51:37 +0530
commite2c65655dcdc5558cfb4ab668c3012024d27ac75 (patch)
tree9ec6504e6bdc2f35f37260981ab584d1b9b3b9b4 /yaksh/live_server_tests/selenium_test.py
parent3d9bce5471d04bf50e03155d3cd67bdae44a4fcc (diff)
downloadonline_test-e2c65655dcdc5558cfb4ab668c3012024d27ac75.tar.gz
online_test-e2c65655dcdc5558cfb4ab668c3012024d27ac75.tar.bz2
online_test-e2c65655dcdc5558cfb4ab668c3012024d27ac75.zip
Removed all the checkpoints set for selenium tests on travis
javascript strings includes method changed to indexOf, as includes belongs to ES6. This was the main reason for failure of selenium tests on travis.
Diffstat (limited to 'yaksh/live_server_tests/selenium_test.py')
-rw-r--r--yaksh/live_server_tests/selenium_test.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/yaksh/live_server_tests/selenium_test.py b/yaksh/live_server_tests/selenium_test.py
index d9ae9cd..21a9e42 100644
--- a/yaksh/live_server_tests/selenium_test.py
+++ b/yaksh/live_server_tests/selenium_test.py
@@ -17,11 +17,8 @@ class ElementDisplay(object):
def __call__(self, driver):
try:
element = EC._find_element(driver, self.locator)
- a = element.value_of_css_property("display") == "none"
- print(a)
- return a
+ return element.value_of_css_property("display") == "none"
except Exception as e:
- print(e)
return False
@@ -65,7 +62,6 @@ class SeleniumTest():
def submit_answer(self, question_label, answer, loop_count=1):
self.driver.implicitly_wait(2)
for count in range(loop_count):
- print("in")
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))
@@ -75,7 +71,7 @@ class SeleniumTest():
def test_c_question(self, question_label):
# Incorrect Answer
- loop_count = 3
+ loop_count = 10
answer = '\"int add(int a, int b, int c)\\n{return;}\"'
self.submit_answer(question_label, answer, loop_count)
@@ -91,7 +87,7 @@ class SeleniumTest():
def test_python_question(self, question_label):
# Incorrect Answer
- loop_count = 3
+ loop_count = 10
answer = '\"def is_palindrome(s):\\n return s\"'
self.submit_answer(question_label, answer, loop_count)
@@ -107,7 +103,7 @@ class SeleniumTest():
def test_bash_question(self, question_label):
# Incorrect Answer
- loop_count = 3
+ loop_count = 10
answer = '\"#!/bin/bash\\nls\"'
self.submit_answer(question_label, answer, loop_count)