Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ sahipro.com with your query.

checkbox not being clicked

Hi All,

I have the following issue, and I'd like to know how I can get around it.

I recorded a checkbox on a page and sahi recorded it as follows:

_click(_checkbox("id_confirm-accepted_terms_conditions"));

Yet, when I run my tests (using Chrome and FF), the box is never clicked and the process never completes. If I use the following alternate accessor, it works:

_click(_label(43));

Unfortunately the alternative is not feasible, as that label changes depending on a various number of factors, so it's never consistent and will break other tests, and I don't want to clutter the test by putting lots of 'if/else' statements in it.

The source for the checkbox is:

<input class="toggler check" id="id_confirm-accepted_terms_conditions" name="confirm-accepted_terms_conditions" type="checkbox">

Is there a way for me to figure out that label id, e.g. the '43' in '_click(_label(43));' and then use some other way to click the checkbox?

Answers

Sign In or Register to comment.