protected function WebTestBase::clickLinkPartialName in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/simpletest/src/WebTestBase.php \Drupal\simpletest\WebTestBase::clickLinkPartialName()
Follows a link by partial name.
If the link is discovered and clicked, the test passes. Fail otherwise.
Parameters
string|\Drupal\Component\Render\MarkupInterface $label: Text between the anchor tags, uses starts-with().
int $index: Link position counting from zero.
Return value
string|bool Page contents on success, or FALSE on failure.
See also
::clickLink()
19 calls to WebTestBase::clickLinkPartialName()
- BasicTest::testViewsWizardAndListing in core/
modules/ views/ src/ Tests/ Wizard/ BasicTest.php - BlockContentTypeTest::testsBlockContentAddTypes in core/
modules/ block_content/ src/ Tests/ BlockContentTypeTest.php - Tests that redirects work as expected when multiple block types exist.
- BlockLanguageCacheTest::testBlockLinks in core/
modules/ block/ src/ Tests/ BlockLanguageCacheTest.php - Creates a block in a language, check blocks page in all languages.
- BlockUiTest::testCandidateBlockList in core/
modules/ block/ src/ Tests/ BlockUiTest.php - Tests the block categories on the listing page.
- BlockUiTest::testContextAwareBlocks in core/
modules/ block/ src/ Tests/ BlockUiTest.php - Tests the behavior of context-aware blocks.
File
- core/
modules/ simpletest/ src/ WebTestBase.php, line 2459 - Contains \Drupal\simpletest\WebTestBase.
Class
- WebTestBase
- Test case for typical Drupal tests.
Namespace
Drupal\simpletestCode
protected function clickLinkPartialName($label, $index = 0) {
return $this
->clickLinkHelper($label, $index, '//a[starts-with(normalize-space(), :label)]');
}