public function TraversingTest::testVeryDeepElementsTraversing in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/driver-testsuite/tests/Basic/TraversingTest.php \Behat\Mink\Tests\Driver\Basic\TraversingTest::testVeryDeepElementsTraversing()
File
- vendor/
behat/ mink/ driver-testsuite/ tests/ Basic/ TraversingTest.php, line 68
Class
Namespace
Behat\Mink\Tests\Driver\BasicCode
public function testVeryDeepElementsTraversing() {
$this
->getSession()
->visit($this
->pathTo('/index.html'));
$page = $this
->getSession()
->getPage();
$footer = $page
->find('css', 'footer');
$this
->assertNotNull($footer);
$searchForm = $footer
->find('css', 'form#search-form');
$this
->assertNotNull($searchForm);
$this
->assertEquals('search-form', $searchForm
->getAttribute('id'));
$searchInput = $searchForm
->findField('Search site...');
$this
->assertNotNull($searchInput);
$this
->assertEquals('text', $searchInput
->getAttribute('type'));
$searchInput = $searchForm
->findField('Search site...');
$this
->assertNotNull($searchInput);
$this
->assertEquals('text', $searchInput
->getAttribute('type'));
$profileForm = $footer
->find('css', '#profile');
$this
->assertNotNull($profileForm);
$profileFormDiv = $profileForm
->find('css', 'div');
$this
->assertNotNull($profileFormDiv);
$profileFormDivLabel = $profileFormDiv
->find('css', 'label');
$this
->assertNotNull($profileFormDivLabel);
$profileFormDivParent = $profileFormDivLabel
->getParent();
$this
->assertNotNull($profileFormDivParent);
$profileFormDivParent = $profileFormDivLabel
->getParent();
$this
->assertEquals('something', $profileFormDivParent
->getAttribute('data-custom'));
$profileFormInput = $profileFormDivLabel
->findField('user-name');
$this
->assertNotNull($profileFormInput);
$this
->assertEquals('username', $profileFormInput
->getAttribute('name'));
}