-
-
Notifications
You must be signed in to change notification settings - Fork 23
Forms
horejsek edited this page Mar 5, 2013
·
1 revision
If some element is form, it provides some more methods.
form = driver.get_elm('formid')
form.fill_out({
'name': 'WebdriverWrapper', # Normal input
'type': 'testing-tool', # Selectbox
'is_awesome': True, # Checkbox
'whatever': [1, 2, 3], # Multicheckbox
})
Method will send key TAB if element is input of type text or textarea. Purpose of this is because of onchange event - JS function registred on that event will be called after losing of focus.
Same as fill_out
, but after that calls submit
.
Some forms have more buttons than one. Simple example is: one for submit and one for reset. This method firstly look for element with id "form id
_submit" and click on it. Otherwise it calls WebElement's submit.
Looks for element with id "form id
_reset" and clicks on it.