david001's avatar

Laravel dusk type in input field

How do I type in a input field with no name and id? This is actually search with dropdown and when user type some text it suggest you available options Any help highly appreciated


<div class="selectize-input items not-full has-options">
		<input type="text" autocomplete="off" tabindex="" style="width: 4px; opacity: 1; position: relative; left: 0px;"></div>
0 likes
4 replies
bugsysha's avatar
bugsysha
Best Answer
Level 61

You use a more specific selector that can locate that input. Note this is a dummy code to give you an idea because I don't know full HTML structure of the page.

body > div.selectize-input > input[autocomplete=off]
david001's avatar

Thanks @bugsysha for help.

$browser->click('.has-options');// this click the input field

$browser->type('input[autocomplete=off]','some text');

Please or to participate in this conversation.