Tuesday, May 23, 2017

Clicking on first instance of class with Laravel Dusk

Hey Guys i have a table with a column of buttons in the final column, I am wanting to test that these buttons are working as expect and i am trying to grab the first button on the page ( first button in last cell of first row ) but i am having problems selecting it, I have been looking around for a solution but so far no solutions have worked;

->click('.btn.btn-danger.btn-xs:first')
->click('.btn.btn-danger.btn-xs:nth-child(1)')
->click('.btn.btn-danger.btn-xs:first-child')



via johnm

Advertisement