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

Submit method="GET" must ignore query string #70

Open
iurisilvio opened this issue Dec 26, 2016 · 0 comments
Open

Submit method="GET" must ignore query string #70

iurisilvio opened this issue Dec 26, 2016 · 0 comments

Comments

@iurisilvio
Copy link

In a HTML form GET submit, the URL must ignore query string.

<!-- index.html -->
<form id="form" method="GET">
    <input type=text name=field />
    <button type="submit">Submit</button>
</form>
browser = RoboBrowser(parser="lxml")
browser.open("http://localhost:8000/")

form = browser.get_form("form")
form["field"] = "value"
browser.submit_form(form)
# browser.url == "http://localhost:8000/?field=value"

form = browser.get_form("form")
form["field"] = "other"
browser.submit_form(form)
# browser.url == "http://localhost:8000/?field=value&field=other"

The url must be http://localhost:8000/?field=other, removing previous query string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant