public function GeneralTest::testFormSubmitWithoutButton 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::testFormSubmitWithoutButton()
File
- vendor/
behat/ mink/ driver-testsuite/ tests/ Form/ GeneralTest.php, line 104
Class
Namespace
Behat\Mink\Tests\Driver\FormCode
public function testFormSubmitWithoutButton() {
$session = $this
->getSession();
$session
->visit($this
->pathTo('/form_without_button.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());
}
}