Skip to content

Commit

Permalink
- adding a guard to fail properly if the field is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
elpargo committed Mar 17, 2011
1 parent 51d447f commit ffb8831
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lettuce_webdriver/webdriver.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Webdriver support for lettuce"""
import time

from nose.tools import assert_true
from nose.tools import assert_true,assert_false

from lettuce import step
from lettuce import world
Expand Down Expand Up @@ -154,6 +154,7 @@ def fill_in_textfield(step, field_name, value):
text_field = find_field(world.browser, 'text', field_name) or \
find_field(world.browser, 'textarea', field_name) or \
find_field(world.browser, 'password', field_name)
assert_false(text_field == False,'Can not find a field named "%s"' % field_name)
text_field.clear()
text_field.send_keys(value)

Expand Down

0 comments on commit ffb8831

Please sign in to comment.