canSeeInTitle() public method

Checks that the page title contains the given string. php seeInTitle('Blog - Post #1'); ?>
See also: Codeception\Lib\InnerBrowser::seeInTitle()
public canSeeInTitle ( $title ) : mixed
$title
return mixed Conditional Assertion: Test won't be stopped on fail
Exemplo n.º 1
0
 /**
  * Executes a search on Google's home page using return key.
  *
  * @covers SauceExtension
  */
 public function testGoogleSearchResults()
 {
     $this->webGuy->am('Anonymous User');
     $this->webGuy->wantTo('execute search on home page');
     $this->webGuy->amOnPage('/');
     $this->webGuy->canSeeInTitle('Google');
     $this->webGuy->fillField('#gbqfq', 'dogecoin');
     $this->webGuy->pressKey('#gbqfq', WebDriverKeys::ENTER);
     $this->webGuy->canSeeInField('input#gbqfq', 'dogecoin');
     $this->webGuy->canSeeInTitle('dogecoin - Google Search');
 }