Dusk: non exist selector check

Created on 13 Apr 2017  路  1Comment  路  Source: laravel/dusk

I wanted to check that given selector is exist or not ?
if ($browser->text('#collapse3 button[data-target="#opennewdrawer"]')) {
//some code
}else{
//some code
}

Most helpful comment

if ($browser->element('#selector'))

>All comments

if ($browser->element('#selector'))
Was this page helpful?
0 / 5 - 0 ratings

Related issues

susanBuck picture susanBuck  路  6Comments

fwang-laralabs picture fwang-laralabs  路  6Comments

subathanikaikumaran picture subathanikaikumaran  路  3Comments

rauldeheer picture rauldeheer  路  4Comments

digitlimit picture digitlimit  路  4Comments