canSeeInField() public method

Checks that the given input field or textarea contains the given value. For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. php seeInField('Body','Type your comment here'); $I->seeInField('form textarea[name=body]','Type your comment here'); $I->seeInField('form input[type=hidden]','hidden_value'); $I->seeInField('#searchform input','Search'); $I->seeInField('//form/*[@name=search]','Search'); $I->seeInField(['name' => 'search'], 'Search'); ?>
See also: Codeception\Lib\InnerBrowser::seeInField()
public canSeeInField ( $field, $value )
$field
$value Conditional Assertion: Test won't be stopped on fail
 /**
  * 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');
 }