I am trying to add an input consisting of multiple lines to a textarea.
The textarea:
<textarea dusk="input-field"><textarea>
I have tried multiple ways of making this happen, but none of them work. This is the base code:
/**
* Testing if submitting a batch is successful.
* @test
* @return void
*/
public function correct_batch()
{
$this->browse(function (Browser $browser) {
$browser->visit('/')
->type('@input-field', 'input')
->press('@submit-button')
->assertSee('success');
});
}
I have tried the following in the command ->type('@input-field', *input*)
, namely:
'input1', 'input2' > only inputs input1
'input1\ninput2' > inputs it as a text in full
'input1<br>input2' > inputs it as a text in full
The problem is solely with the input.
Any help would be much appreciated.