1

I have a wysiwyg editor in my project, that I need to test and it has a contenteditable property. I cant type directly, as it is a simple <trix-editor> tag:

<trix-editor input="28" placeholder="Type your message here..." contenteditable="" role="textbox" trix-id="2" toolbar="trix-toolbar-2">
</trix-editor>

As you can notice, it has contenteditable attribute. I can edit it easily with Selenium IDE when running Selenium tests and it shows command edit content.

Can the same be done with Laravel Dusk?

timbre timbre
  • 12,648
  • 10
  • 46
  • 77
naneri
  • 3,771
  • 2
  • 29
  • 53

1 Answers1

1

You can edit the content with keys():

$browser->keys('[trix-id="2"]', 'Text')
Jonas Staudenmeir
  • 24,815
  • 6
  • 63
  • 109