Skip to content

Commit

Permalink
zope: fixed fill_form custom types.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsmedina committed Jan 26, 2014
1 parent e2ffe0d commit b803ea8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions splinter/driver/zopetestbrowser.py
Expand Up @@ -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:
Expand All @@ -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)
Expand Down

0 comments on commit b803ea8

Please sign in to comment.