foreach(range(1634, 1636) as $value) {
$browser->click('input[value='.$value.']');
}
or
foreach(range(1634, 1636) as $value) {
$browser->click('#field_9092_'.$value);
}
Bunch of ways to do it, just pick the one you like most.
Hi, I am not able to check the checkbox. My all checkbox ids are unique. I tried to loop and check but it didn't work for me. I also tried to check one by one based on id but did not work if i use this selector $browser->click('.custom-check-box'); it just check first one. Any help please
<div class="checkbox-group" data-parsley-group="step-0">
<span class="checkbox custom-checkbox custom-check-box">
<input
id="field_9092_1634"
data-parsley-multiple="field_9092"
type="checkbox"
value="1634"
name="field_9092[]"
data-parsley-group="step-0"
/><label class="check-box-label" for="field_9092_1634">a</label></span
><span class="checkbox custom-checkbox custom-check-box"
><input
id="field_9092_1635"
data-parsley-multiple="field_9092"
type="checkbox"
value="1635"
name="field_9092[]"
checked=""
data-parsley-group="step-0"
/><label class="check-box-label" for="field_9092_1635">b</label></span
><span class="checkbox custom-checkbox custom-check-box"
><input
id="field_9092_1636"
data-parsley-multiple="field_9092"
type="checkbox"
value="1636"
name="field_9092[]"
data-parsley-group="step-0"
/><label class="check-box-label" for="field_9092_1636">c</label></span
>
<div class="errorcontainer"></div>
</div>
Please or to participate in this conversation.