MDL-50481 behat: Press go button for given single select in non-js
For non-js mode, ensure we press the go button for the specified single select, as there can be multiple single selects on the page with go button
This commit is contained in:
@@ -394,7 +394,12 @@ class behat_forms extends behat_base {
|
||||
);
|
||||
|
||||
if (!$this->running_javascript()) {
|
||||
$actions[] = new Given('I press "' . get_string('go') . '"');
|
||||
// Press button in the specified select container.
|
||||
$containerxpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' singleselect ') and " .
|
||||
".//label[contains(normalize-space(string(.)), '" . $singleselect . "')]]";
|
||||
|
||||
$actions[] = new Given('I click on "' . get_string('go') . '" "button" in the "' . $containerxpath .
|
||||
'" "xpath_element"');
|
||||
}
|
||||
|
||||
return $actions;
|
||||
|
||||
Reference in New Issue
Block a user