_generated\AcceptanceTesterActions::canSee PHP Method

canSee() public method

Checks that the current page contains the given string (case insensitive). You can specify a specific HTML element (via CSS or XPath) as the second parameter to only search within that element. php see('Logout'); // I can suppose user is logged in $I->see('Sign Up', 'h1'); // I can suppose it's a signup page $I->see('Sign Up', '//body/h1'); // with XPath Note that the search is done after stripping all HTML tags from the body, so $I->see('strong') will return true for strings like: -

I am Stronger than thou

- But will *not* be true for strings like: - Home -
Home - For checking the raw source code, use seeInSource().
See also: Codeception\Module\WebDriver::see()
public canSee ( $text, null $selector = null )
$text
$selector null Conditional Assertion: Test won't be stopped on fail
    public function canSee($text, $selector = null)
    {
        return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args()));
    }
AcceptanceTesterActions