Permalink
Browse files

zope: fixed fill_form custom types.

  • Loading branch information...
1 parent e2ffe0d commit b803ea8aeb1a6c90ca38e5eb37a88c1a1e48e26a @andrewsmedina andrewsmedina committed Jan 26, 2014
Showing with 3 additions and 4 deletions.
  1. +3 −4 splinter/driver/zopetestbrowser.py
@@ -173,9 +173,7 @@ def fill_form(self, field_values):
for name, value in field_values.items():
element = self.find_by_name(name)
control = element.first._control
- if control.type in ['text', 'textarea', 'password', 'tel']:
- control.value = value
- elif control.type == 'checkbox':
+ if control.type == 'checkbox':
if value:
control.value = control.options
else:
@@ -185,7 +183,8 @@ def fill_form(self, field_values):
elif control.type == 'select':
control.value = [value]
else:
- control.value = [value]
+ # text, textarea, password, tel
+ control.value = value
def choose(self, name, value):
control = self._browser.getControl(name=name)

0 comments on commit b803ea8

Please sign in to comment.