MCPcopy Create free account
hub / github.com/Pylons/webtest / select

Method select

webtest/forms.py:599–606  ·  view source on GitHub ↗

Like ``.set()``, except also confirms the target is a `` `` and allows selecting options by text.

(self, name, value=None, text=None, index=None)

Source from the content-addressed store, hash-verified

597 return fields[index]
598
599 def select(self, name, value=None, text=None, index=None):
600 """Like ``.set()``, except also confirms the target is a ``<select>``
601 and allows selecting options by text.
602 """
603 field = self.get(name, index=index)
604 assert isinstance(field, Select)
605
606 field.select(value, text)
607
608 def select_multiple(self, name, value=None, texts=None, index=None):
609 """Like ``.set()``, except also confirms the target is a

Callers 2

test_form_selectMethod · 0.45
test_single_selectMethod · 0.45

Calls 1

getMethod · 0.95

Tested by 2

test_form_selectMethod · 0.36
test_single_selectMethod · 0.36