<table>
<tbody>
<tr>
<th scope="row">
<input type="text" class="form-control">
</th>
<th scope="row">
<textarea rows="8" class="form-control"></textarea>
</th>
<th scope="row"></th>
</tr>
<tr> </tr>
</tbody>
</table>
如果我想用laravel dusk在上面的textarea中添加文本, 我如何使用 type()
方法,使用xpath来获取选择器。
我的元素的xpath是。$selector = "//div[@id='__BVID__34']/div/div[2]/table/tbody/tr[1]/th[1]/input";
谁能告诉我如何在类型方法中使用这个选择器?$browser->type('$selector', 'text-to-type');
先谢谢你