mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-45284 behat: Replace wrongly triggered not found exception
This commit is contained in:
parent
eabcd76d4d
commit
32aea6a84f
1 changed files with 7 additions and 2 deletions
|
@ -54,10 +54,15 @@ class behat_field_manager {
|
|||
try {
|
||||
// The DOM node.
|
||||
$fieldnode = $context->find_field($label);
|
||||
} catch (ElementNotFoundException $e) {
|
||||
} catch (ElementNotFoundException $fieldexception) {
|
||||
|
||||
// Looking for labels that points to filemanagers.
|
||||
$fieldnode = $context->find_filemanager($label);
|
||||
try {
|
||||
$fieldnode = $context->find_filemanager($label);
|
||||
} catch (ElementNotFoundException $filemanagerexception) {
|
||||
// We want the generic 'field' exception.
|
||||
throw $fieldexception;
|
||||
}
|
||||
}
|
||||
|
||||
// The behat field manager.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue