src/Concerns/WaitsForElements.php
public function whenAvailable($selector, Closure $callback, $seconds = null)
    {
        return $this->waitFor($selector, $seconds)->with($selector, $callback);
    }
public function whenAvailable($selector, Closure $callback, $seconds = null)
    {
        return $this->waitFor($selector, $seconds)->with($selector, $callback);
    }
public function whenAvailable ( $ selector , Closure $ callback , $ seconds = null ) { return $ this -> waitFor ( $ selector , $ seconds ) -> with ( $ selector , $ callback ) ; }
Execute the given callback in a scoped browser once the selector is available.

@param  string  $selector
@param  Closure  $callback
@param  int  $seconds
@return $this
@throws \Facebook\WebDriver\Exception\TimeOutException
Execute the given callback in a scoped browser once the selector is available .