2 years ago

Selecting elements in Laravel Dusk

Posted 2 years ago by squibby

I'm struggling to select certain elemets in Laravel Dusk. In paticular I have some checkboxes which are hidden that are recreated and styled in js/css.

My HTML is something like below.

<div class="mt-checkbox-inline">
    <label class="mt-checkbox">
            <input id="broadcast_check" type="checkbox" name="options[]" value="broadcast"> BROADCAST

      <label class="mt-checkbox">
             <input id="document_check" type="checkbox" name="options[]" value="document"> DOCUMENTS
     <div class="errorbox"></div>

I want to be able to programmatically check the checkboxes.

I get error:

Facebook\WebDriver\Exception\UnknownServerException: unknown error: Element <input id="broadcast_check" type="checkbox" name="options[]" value="broadcast"> is not clickable at point (190, 375). Other element would receive the click: <label class="mt-checkbox">...</label>

I have tried various options:


How can I go about selecting elements in dusk?

Please sign in or create an account to participate in this conversation.