I need help writting test with Laravel Dusk. I'm using Vue with ElementUI. I really like this framework, however, I can't use Dusk's build-in select()
method in my tests.
It's because the select component of ElementUI does not generate a real <select>
tag, instead, it creates a normal <input>
(that is readonly) and, at bottom of the page, the popper with select's options, so, there is not a <select>
tag in my page, only a <div>
and a readonly <input>
.
How can I write a test with Dusk that lets me click on a 'div'??
If I try to type on that input with something like this:
// $browser->select('my_select_id'); not working,
$browser->type('my_select_id', 1);
It throws me an Exception:
Facebook\WebDriver\Exception\InvalidElementStateException: invalid element state: Element must be user-editable in order to clear it.
So I don't know how to test ElementUI's selects :(
Please help,
Thx!
Aucun commentaire:
Enregistrer un commentaire