Permalink
Browse files

correct test

  • Loading branch information...
1 parent df77c9e commit 494cc291eadf3cf37e4279e4a68239e379bc0c2e @omansion omansion committed Dec 9, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 tests/test_polls.py
View
@@ -1,10 +1,10 @@
#-*- coding: utf-8 -*-
+import time
+
from selenose.cases import SeleniumTestCase
from djangosanetesting.cases import HttpTestCase
-from selenium.webdriver.support.ui import WebDriverWait
-
class PollsTestCase(SeleniumTestCase, HttpTestCase):
def test_vote(self):
@@ -14,8 +14,10 @@ def test_vote(self):
poll = self.driver.find_element_by_link_text('How is selenose?')
# Click on the link
poll.click()
- # Wait page
- choices = WebDriverWait(self.driver, 5).until(lambda driver : self.driver.find_elements_by_name('choice'))
+ # Load page
+ time.sleep(2)
+ # Get the available choices
+ choices = self.driver.find_elements_by_name('choice')
# Check that only two choices: "Cool" and "Super cool"
self.assertEquals(2, len(choices))
# Select "Super cool"

0 comments on commit 494cc29

Please sign in to comment.