Pylons / Pylons/webtest

Form fields with "disabled" get sent to the server

Open
#138 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
346
Forks
113
PR merge metrics
No merged PRs in 30d

Description

Most (all?) browsers exclude disabled form fields (e.g. <input type="text" name="whatever" disabled>) from the form data they send during form submission. However, webtest doesn’t do this, which made several tests of mine fail. Is there a way to mimic this behaviour?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating WebTest's form serialization and submission handling, then inspect any tests covering disabled controls. Reproduce the reported form submission case and add coverage showing the expected treatment of disabled fields; done means the behavior matches browser form submission for that case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.