Do text inputs have a clear input option
Do form text inputs have a clear input feature (like an x at the end of the input to clear the field) ?
Solution
Or you can change type like this 
->type('search') then close button will show.. But I don't know whether this one will bring error or not