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

checkOption doesn't work with radio inputs #17

Closed
petr opened this issue Apr 11, 2012 · 1 comment
Closed

checkOption doesn't work with radio inputs #17

petr opened this issue Apr 11, 2012 · 1 comment

Comments

@petr
Copy link

petr commented Apr 11, 2012

Example html

<div class="reg-form-checkbox">
        <label>
            <input type="radio" name="current_tax[tax_id]" id="current_tax_tax_id_1" value="1" > Tax single
        </label>
</div>
$i->checkOption('#current_tax_tax_id_1');

Throws error

Couldn't test select tax (StartPageCept.php)
  Exception thrown LogicException:
  You cannot tick "current_tax[tax_id]" as it is not a checkbox (radio).
  Stack trace:
   #1 tick /usr/share/php/mink/src/Behat/Mink/Driver/GoutteDriver.php:329
   #2 check /usr/share/php/mink/src/Behat/Mink/Element/NodeElement.php:147
   #3 check /usr/share/php/Codeception/src/Codeception/Util/Mink.php:213

Codeception PHP Testing Framework v1.0.7

@DavertMik
Copy link
Member

I'm not quite sure in your issue, but your code is not valid XHTML.
Maybe that stops parser from acting properly.'

Please try to add closing "/>" for your input tag

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

No branches or pull requests

2 participants