Source snippet:
<div>
<div class="checkbox checkbox-primary margin-bottom-5 margin-top-5">
<input id="item" name="item" type="checkbox" value="true"/>
<label for="item">Item_Text</label>
<input name="item" type="hidden" value="false"/>
</div>
I'm trying to click on this checkbox using Splinter with the following code:
browser.find_by_id('item')click()
I've also tried find_by_name. Both produce the following exception:
(<class 'selenium.common.exceptions.ElementNotVisibleException'>, ElementNotVisibleException()
Attempting to debug:
print browser.is_element_present_by_id(item), browser.find_by_id(item).visible
returns True, False
It looks like Splinter's having trouble clicking the box because the second input block shows type='hidden'. However, adding .first.click() does not fix the problem and I'm out of ideas. I might be missing something really simple!