src/Context/Redirect/RedirectContext.php
public function visitPage($path, $code = 200)
    {
        if (!$this->assertStatusCode($path, $code)) {
            throw new \Exception(sprintf('The page "%s" is not accessible!', $path));
        }

        self::debug(['Visited page: %s'], [$path]);

        $this->visitPath($path);
    }
public function visitPage($path, $code = 200)
    {
        if (!$this->assertStatusCode($path, $code)) {
            throw new \Exception(sprintf('The page "%s" is not accessible!', $path));
        }

        self::debug(['Visited page: %s'], [$path]);

        $this->visitPath($path);
    }
public function visitPage ( $ path , $ code = 200 ) { if ( ! $ this -> assertStatusCode ( $ path , $ code ) ) { throw new \ Exception ( sprintf ( 'The page "%s" is not accessible!' , $ path ) ) ; } self :: debug ( [ 'Visited page: %s' ] , [ $ path ] ) ; $ this -> visitPath ( $ path ) ; }
This step should be used instead of "I am at" if page should be checked
for accessibility before visiting.

Also, this step can be replaced by:
Then I am at "page/url"

@param string $path
Path to visit.
@param string|int $code
Expected HTTP status code.

@throws \Exception

@Given /^I am on the "([^"]*)" page(?:| and HTTP code is "([^"]*)")$/
@Given /^(?:|I )visit the "([^"]*)" page(?:| and HTTP code is "([^"]*)")$/
This step should be used instead of I am at if page should be checked for accessibility before visiting .