Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Moved an import statement to handle the case where selenium isn't ins…


git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e1bbf3b6bc8a10cfea9c3101434b13d202637830 1 parent f0c2228
@jphalip jphalip authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/admin/
2  django/contrib/admin/
@@ -1,5 +1,4 @@
import sys
-from selenium.common.exceptions import NoSuchElementException
from django.test import LiveServerTestCase
from django.utils.importlib import import_module
@@ -79,6 +78,7 @@ def select_option(self, selector, value):
Helper function to select the <OPTION> that has the value `value` and
that is in the <SELECT> widget identified by the CSS selector `selector`.
+ from selenium.common.exceptions import NoSuchElementException
options = self.selenium.find_elements_by_css_selector('%s option' % selector)
for option in options:
if option.get_attribute('value') == value:

0 comments on commit e1bbf3b

Please sign in to comment.
Something went wrong with that request. Please try again.