Skip to content
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

Django client: Fields in buttons are missing from POST data #709

Open
oTree-org opened this issue Aug 8, 2019 · 2 comments
Open

Django client: Fields in buttons are missing from POST data #709

oTree-org opened this issue Aug 8, 2019 · 2 comments
Labels
bug django Relates to the Django client

Comments

@oTree-org
Copy link

oTree-org commented Aug 8, 2019

I have this form:

<form method="POST">
<button name="foo" value="1">Submit</button>
(some other fields etc...)
</form>

When I do this:

browser.find_by_name('foo').first.click()

On the server I can see that the submitted POST data is missing the field "foo".

I'm using splinter[django]==0.11.0 with Python 3.7 but I recall this happening about a year ago also.

@sukhbeersingh
Copy link
Contributor

Hey @andrewsmedina, could I help in this issue? Where would I start looking?

@andrewsmedina
Copy link
Member

@sukhbeersingh your help are welcome. I believe that tho fix this issue we should improve the lxmldriver (the driver that django extends) serialize method to get data from the button elements: https://github.com/cobrateam/splinter/blob/master/splinter/driver/lxmldriver.py#L47

@jsfehler jsfehler added the django Relates to the Django client label Mar 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug django Relates to the Django client
Projects
None yet
Development

No branches or pull requests

4 participants