Skip to content

Commit

Permalink
MDL-44873 behat: Added suppport for clean error class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajesh Taneja committed Apr 4, 2014
1 parent 0ac63cf commit f8b589c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/tests/behat/behat_hooks.php
Expand Up @@ -478,7 +478,11 @@ public function i_look_for_exceptions() {
if ($errormsg = $this->getSession()->getPage()->find('xpath', $exceptionsxpath)) {

// Getting the debugging info and the backtrace.
$errorinfoboxes = $this->getSession()->getPage()->findAll('css', 'div.notifytiny');
$errorinfoboxes = $this->getSession()->getPage()->findAll('css', 'div.alert-error');
// If errorinfoboxes is empty, try find notifytiny (original) class.
if (empty($errorinfoboxes)) {
$errorinfoboxes = $this->getSession()->getPage()->findAll('css', 'div.notifytiny');
}
$errorinfo = $this->get_debug_text($errorinfoboxes[0]->getHtml()) . "\n" .
$this->get_debug_text($errorinfoboxes[1]->getHtml());

Expand Down

0 comments on commit f8b589c

Please sign in to comment.