src/Concerns/InteractsWithElements.php
public function pressAndWaitFor($button, $seconds = 5)
    {
        $element = $this->resolver->resolveForButtonPress($button);

        $element->click();

        return $this->waitUsing($seconds, 100, function () use ($element) {
            return $element->isEnabled();
        });
    }
public function pressAndWaitFor($button, $seconds = 5)
    {
        $element = $this->resolver->resolveForButtonPress($button);

        $element->click();

        return $this->waitUsing($seconds, 100, function () use ($element) {
            return $element->isEnabled();
        });
    }
public function pressAndWaitFor ( $ button , $ seconds = 5 ) { $ element = $ this -> resolver -> resolveForButtonPress ( $ button ) ; $ element -> click ( ) ; return $ this -> waitUsing ( $ seconds , 100 , function ( ) use ( $ element ) { return $ element -> isEnabled ( ) ; } ) ; }
Press the button with the given text or name.

@param  string  $button
@param  int  $seconds
@return $this
Press the button with the given text or name .