src/Concerns/WaitsForElements.php
public function waitForDialog($seconds = null)
    {
        $seconds = is_null($seconds) ? static::$waitSeconds : $seconds;

        $this->driver->wait($seconds, 100)->until(
            WebDriverExpectedCondition::alertIsPresent(), "Waited {$seconds} seconds for dialog."
        );

        return $this;
    }
public function waitForDialog($seconds = null)
    {
        $seconds = is_null($seconds) ? static::$waitSeconds : $seconds;

        $this->driver->wait($seconds, 100)->until(
            WebDriverExpectedCondition::alertIsPresent(), "Waited {$seconds} seconds for dialog."
        );

        return $this;
    }
public function waitForDialog ( $ seconds = null ) { $ seconds = is_null ( $ seconds ) ? static :: $ waitSeconds : $ seconds ; $ this -> driver -> wait ( $ seconds , 100 ) -> until ( WebDriverExpectedCondition :: alertIsPresent ( ) , "Waited {$seconds} seconds for dialog." ) ; return $ this ; }
Wait for a JavaScript dialog to open.

@param  int  $seconds
@return $this
Wait for a JavaScript dialog to open .