mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-43173_master' of git://github.com/dmonllao/moodle
This commit is contained in:
commit
267d4927b4
2 changed files with 21 additions and 3 deletions
|
@ -104,6 +104,11 @@ class behat_form_select extends behat_form_field {
|
|||
// Wrapped in a try & catch as we can fall into race conditions
|
||||
// and the element may not be there.
|
||||
try {
|
||||
|
||||
// Wait for all the possible AJAX requests that have been
|
||||
// already triggered by selectOption() to be finished.
|
||||
$this->session->wait(behat_base::TIMEOUT * 1000, behat_base::PAGE_READY_JS);
|
||||
|
||||
current($optionnodes)->click();
|
||||
} catch (Exception $e) {
|
||||
// We continue and return as this means that the element is not there or it is not the same.
|
||||
|
@ -112,6 +117,11 @@ class behat_form_select extends behat_form_field {
|
|||
}
|
||||
|
||||
} else {
|
||||
|
||||
// Wait for all the possible AJAX requests that have been
|
||||
// already triggered by selectOption() to be finished.
|
||||
$this->session->wait(behat_base::TIMEOUT * 1000, behat_base::PAGE_READY_JS);
|
||||
|
||||
// Wrapped in a try & catch as we can fall into race conditions
|
||||
// and the element may not be there.
|
||||
try {
|
||||
|
@ -127,6 +137,10 @@ class behat_form_select extends behat_form_field {
|
|||
return;
|
||||
}
|
||||
|
||||
// Wait for all the possible AJAX requests that have been
|
||||
// already triggered by selectOption() to be finished.
|
||||
$this->session->wait(behat_base::TIMEOUT * 1000, behat_base::PAGE_READY_JS);
|
||||
|
||||
// Wrapped in a try & catch as we can fall into race conditions
|
||||
// and the element may not be there.
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue