diff options
author | ankitjavalkar | 2018-10-15 15:24:36 +0530 |
---|---|---|
committer | GitHub | 2018-10-15 15:24:36 +0530 |
commit | f2a03ec0fa32e0f23d1f8215209450c3251f691b (patch) | |
tree | f80de07675fc4373500564e9c66fbe6904453e3a /yaksh/live_server_tests/selenium_test.py | |
parent | 1a2bea3da65a5b2b98aaa15085d474c50fb55038 (diff) | |
parent | 9fb9fd3d5afc257cb9c2f6e15b5a3f96b2ec8d51 (diff) | |
download | online_test-f2a03ec0fa32e0f23d1f8215209450c3251f691b.tar.gz online_test-f2a03ec0fa32e0f23d1f8215209450c3251f691b.tar.bz2 online_test-f2a03ec0fa32e0f23d1f8215209450c3251f691b.zip |
Merge pull request #524 from FOSSEE/rebase-ui-try2
UI Changes to Yaksh [FOSSEE Fellowship 2018]
Diffstat (limited to 'yaksh/live_server_tests/selenium_test.py')
-rw-r--r-- | yaksh/live_server_tests/selenium_test.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/yaksh/live_server_tests/selenium_test.py b/yaksh/live_server_tests/selenium_test.py index 5bf1988..41a0fad 100644 --- a/yaksh/live_server_tests/selenium_test.py +++ b/yaksh/live_server_tests/selenium_test.py @@ -27,6 +27,8 @@ class SeleniumTestError(Exception): class SeleniumTest(): def __init__(self, url, quiz_name, module_name, course_name): self.driver = webdriver.Firefox() + self.driver.set_window_position(0, 0) + self.driver.set_window_size(1024, 768) self.quiz_name = quiz_name self.module_name = module_name self.course_name = course_name @@ -124,8 +126,8 @@ class SeleniumTest(): def open_quiz(self): # open module link self.driver.find_elements_by_partial_link_text( - self.course_name)[0].click() - self.driver.find_element_by_link_text(self.module_name).click() + 'START')[0].click() + self.driver.find_element_by_link_text('Start').click() # open quiz link self.driver.find_element_by_link_text(self.quiz_name).click() @@ -157,12 +159,15 @@ class SeleniumTest(): quit_link_elem.click() def logout(self): - logout_link_elem = WebDriverWait(self.driver, 5).until( - EC.presence_of_element_located((By.ID, "logout")) + logout_link_menu = WebDriverWait(self.driver, 10).until( + EC.presence_of_element_located((By.ID, "user_dropdown")) + ) + logout_link_menu.click() + logout_link_elem = WebDriverWait(self.driver, 10).until( + EC.presence_of_element_located((By.ID, "user_logout")) ) logout_link_elem.click() - def user_gen(url, ids): return [(url, 'User%d' % x, 'User%d' % x) for x in ids] |