0

I am writing Behat/Selenium2 tests and I want to check a checkbox on the page I test but I got this error :

When I check "id_checkbox_role_module_keyword"
      Element is not currently visible and so may not be interacted with

However I can see my checkbox :

checkbox

And this is my DOM :

<div class="checkbox check-success">
    <input type="checkbox" id="id_checkbox_role_module_keyword" name="name" value="ROLE_MODULE_KEYWORD" />
    <label for="id_checkbox_role_module_keyword"><i class="fa fa-line-chart" title="ROLE_MODULE_KEYWORD" data-toggle="tooltip"></i>
                ROLE_MODULE_KEYWORD</label>
</div>

Moreover what is weird is that if I test Then I should see "ROLE_MODULE_KEYWORD", the test passes, so selenium2 is seeing this checkbox :

image2

What's weird is that I have those same checkboxes on an other page and if I execute the same test on the other page, it is completely validated and I don't understand why because both pages have the same HTML.

Thank you for your help!

sf_tristanb
  • 8,725
  • 17
  • 74
  • 118
  • 1
    can u post the code where u r trying to enable that checkbox – Mrunal Gosar Apr 16 '15 at 11:56
  • It's `When I check "ROLE_MODULE_KEYWORD"` in the second screenshot. Behind the curtains, it executes the following code : https://github.com/Behat/MinkExtension/blob/master/src/Behat/MinkExtension/Context/MinkContext.php#L153 – sf_tristanb Apr 16 '15 at 12:27

0 Answers0