Unverified Commit a7ba6272 authored by alexpott's avatar alexpott

Issue #2913901 by jhedstrom: Non-helpful error when BrowserTestBase::clickLink...

Issue #2913901 by jhedstrom: Non-helpful error when BrowserTestBase::clickLink doesn't find the link
parent 126b594c
......@@ -1177,6 +1177,7 @@ protected function cssSelect($selector) {
protected function clickLink($label, $index = 0) {
$label = (string) $label;
$links = $this->getSession()->getPage()->findAll('named', ['link', $label]);
$this->assertArrayHasKey($index, $links, 'The link ' . $label . ' was not found on the page.');
$links[$index]->click();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment