-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exposes "submit" method on form elements #107
Comments
Indeed we can provide a with browser.get_form_by_id('my_form') as form:
form.fill('name', 'Bla')
form.fill('age', '20')
form.submit() It's a bit related to issue #28. |
I think we should return The context manager you propose is just syntactic sugar around this idea -- first we need to return objects which have methods and attributes that makes sense (so I think #111 is more important than #28). This issue is strongly related to #111 (Return tag-specific objects in DriverAPI.find_* methods) -- really, issue #111 is a generalisation of this (for all kind of HTML elements). |
Sorry, I wrongly cliked "comment & close". |
Has this been adressed? I would like to be able to choose which submit button to use in case there are several. |
+1 Seems related to my problems with #471. |
If I have a form, like in:
the object
my_form._element
will have thesubmit
method.As we should not use
_element
since it is related to Selenium, Splinter should exposes asubmit
method in this form-object, so we can submit forms without needing to search for the submit button (or element that actually submits the form).It is not useful when we want to test if some button, when clicked, submits the form correctly. But it's very useful when we just want to submit the form and check what is the response (and don't want to know the name of the button/element that submits the form).
The text was updated successfully, but these errors were encountered: