Wait for a JavaScript dialog to open.

@param  int  $seconds
@return $this
422778
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;
    }
987426
public function setCurlTimeout($seconds)
    {
        if (!is_numeric($seconds) || $seconds < 0) {
            throw new \InvalidArgumentException('Timeout value must be numeric and a non-negative number.');
        }

        $this->curlTimeout = $seconds;
        return $this;
    }
314082
public function lock(string $name, int $seconds = 0): Lock
    {
        return new CouchbaseLock($this->bucket, $this->prefix.$name, $seconds);
    }
394931
public function wait_for_second( $second = 1 )
	{
		$second = $this->replace_variables( $second );
		$this->getSession()->wait( $second * 1000 );
	}
181206
public function waitForLink($link, $seconds = null)
    {
        $message = $this->formatTimeOutMessage('Waited %s seconds for link', $link);

        return $this->waitUsing($seconds, 100, function () use ($link) {
            return $this->seeLink($link);
        }, $message);
    }
301773
function setTimeout($seconds)
    {
        if (is_array($seconds))
            $seconds = implode('.', $seconds);

        $this->timeout = $seconds;
        return $this;
    }
725210
private double popup(double seconds) {
        // wait for up to XX seconds for the error message
        double end = System.currentTimeMillis() + (seconds * 1000);
        WebDriverWait wait = new WebDriverWait(app.getDriver(), (long) seconds, DEFAULT_POLLING_INTERVAL);
        wait.until(ExpectedConditions.alertIsPresent());
        return Math.min((seconds * 1000) - (end - System.currentTimeMillis()), seconds * 1000) / 1000;
    }
387098
public function waitUntil($script, $seconds = null, $message = null)
    {
        if (! Str::startsWith($script, 'return ')) {
            $script = 'return '.$script;
        }

        if (! Str::endsWith($script, ';')) {
            $script = $script.';';
        }

        return $this->waitUsing($seconds, 100, function () use ($script) {
            return $this->driver->executeScript($script);
        }, $message);
    }
972718
public void promptPresent(double seconds) {
        try {
            double timeTook = popup(seconds);
            checkPromptPresent(seconds, timeTook);
        } catch (TimeoutException e) {
            checkPromptPresent(seconds, seconds);
        }
    }
739696
public function addSeconds($seconds)
    {
        $seconds = (float) $seconds;
        $interval = new DateInterval('PT' . abs($seconds) . 'S');

        if ($seconds < 0) {
            $interval->invert = 1;
        }

        return $this->add($interval);
    }
447431
public function waitForLocation($path, $seconds = null)
    {
        $message = $this->formatTimeOutMessage('Waited %s seconds for location', $path);

        return $this->waitUntil("window.location.pathname == '{$path}'", $seconds, $message);
    }
898132
public function cache($seconds = null)
    {
        if ($seconds === null) {
            $this->cacheTime = $this->defaultCacheTime;
        } elseif ($seconds === false) {
            $this->cacheTime = false;
        } else {
            $this->cacheTime = (int)$seconds;
        }
        return $this;
    }
347622
public void confirmationPresent(double seconds) {
        try {
            double timeTook = popup(seconds);
            checkConfirmationPresent(seconds, timeTook);
        } catch (TimeoutException e) {
            checkConfirmationPresent(seconds, seconds);
        }
    }
759470
public function lock($name, $seconds = 0, $owner = null)
    {
        return new MemcachedLock($this->memcached, $this->prefix.$name, $seconds, $owner);
    }
434091
public function block($seconds, $callback = null)
    {
        $starting = $this->currentTime();

        while (! $this->acquire()) {
            usleep(250 * 1000);

            if ($this->currentTime() - $seconds >= $starting) {
                throw new LockTimeoutException;
            }
        }

        if (is_callable($callback)) {
            try {
                return $callback();
            } finally {
                $this->release();
            }
        }

        return true;
    }
275568
public function remember($seconds = null, CacheInterface $cache = null)
	{
		if (is_null($cache))
		{
			// use the built in cache interface
			$cache = new Cache;
		}
		$this->cache = $cache;
		if (is_null($seconds))
		{
			$this->seconds = $this->defaultRemember;
		}
		else
		{
			$this->seconds = $seconds;
		}

		return $this;
	}
590747
public function setWritingTimeout(float $seconds): self
    {
        $this->validateTimeout($seconds);
        $this->writingTimeout = $seconds;

        return $this;
    }