Working around an element-not-visible error in Sn test

pull/1/head
Raymond Yee 2012-05-21 14:21:04 -07:00
parent dd8b892a42
commit f0e6dd0555
1 changed files with 3 additions and 1 deletions

View File

@ -202,7 +202,9 @@ def support_campaign(unglue_it_url = settings.LIVE_SERVER_TEST_URL, do_local=Tru
sel.find_element_by_css_selector("input[value*='sign in']").click()
# click on biggest campaign list
biggest_campaign_link = WebDriverWait(sel,20).until(lambda d: d.find_element_by_css_selector("a[href*='/campaigns/ending']"))
# I have no idea why selenium thinks a is not displayed....so that's why I'm going up one element.
# http://stackoverflow.com/a/6141678/7782
biggest_campaign_link = WebDriverWait(sel,20).until(lambda d: d.find_element_by_css_selector("li > a[href*='/campaigns/ending']"))
biggest_campaign_link.click()
time.sleep(1)