public function GeneralTest::testFormSubmit in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/behat/mink/driver-testsuite/tests/Form/GeneralTest.php \Behat\Mink\Tests\Driver\Form\GeneralTest::testFormSubmit()
File
- vendor/
behat/ mink/ driver-testsuite/ tests/ Form/ GeneralTest.php, line 89
Class
Namespace
Behat\Mink\Tests\Driver\FormCode
public function testFormSubmit() {
$session = $this
->getSession();
$session
->visit($this
->pathTo('/basic_form.html'));
$webAssert = $this
->getAssertSession();
$webAssert
->fieldExists('first_name')
->setValue('Konstantin');
$webAssert
->elementExists('xpath', 'descendant-or-self::form[1]')
->submit();
if ($this
->safePageWait(5000, 'document.getElementById("first") !== null')) {
$this
->assertEquals('Firstname: Konstantin', $webAssert
->elementExists('css', '#first')
->getText());
}
}