-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
Selecting a radio button with value "0" is not possible if another element is pre-selected #623
Comments
Bizarre - I've just chased down this exact same issue, and here it is top of the list :) All I have to add is that it doesn't matter about pre-selected values. On a completely fresh form this bug also prevents me from selecting a checkbox/radio with a non-truthy value. I had a ChoiceType form with two radios - {"Yes": "1", "No": "0"} - and trying to submit the form via Panther with {"confirm": "0"} ended up with it selecting "Yes" :D (A workaround for my issue was to change my form to use the "choice_value" option to alter the strings that were being outputted on the HTML side whilst not changing the data values that the form returned via getData()) |
In a form in my project, a form holds two radio buttons for the field
transfer
with values0
and1
. When the button with value1
is pre-selected, I cannot change that.$form['transfer']->setValue('0');
does nothing, asSymfony\Component\Panther\WebDriver\WebDriverCheckbox::getRelatedElements
does not yield any field selector when$value = '0'
I could get this working when modifing the first line of that method from
to
The text was updated successfully, but these errors were encountered: