mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
Merge branch 'MDL-72152-master' of https://github.com/sammarshallou/moodle
This commit is contained in:
commit
dd41f234b6
@ -1717,7 +1717,7 @@ EOF;
|
||||
}
|
||||
|
||||
/**
|
||||
* Press a named key with an optional set of modifiers.
|
||||
* Press a named or character key with an optional set of modifiers.
|
||||
*
|
||||
* Supported named keys are:
|
||||
* - up
|
||||
@ -1735,6 +1735,8 @@ EOF;
|
||||
* - enter
|
||||
* - tab
|
||||
*
|
||||
* You can also use a single character for the key name e.g. 'Ctrl C'.
|
||||
*
|
||||
* Supported moderators are:
|
||||
* - shift
|
||||
* - ctrl
|
||||
@ -1830,7 +1832,12 @@ EOF;
|
||||
$keys[] = behat_keys::SPACE;
|
||||
break;
|
||||
default:
|
||||
throw new \coding_exception("Unknown key '$key'}");
|
||||
// You can enter a single ASCII character (e.g. a letter) to directly type that key.
|
||||
if (strlen($key) === 1) {
|
||||
$keys[] = strtolower($key);
|
||||
} else {
|
||||
throw new \coding_exception("Unknown key '$key'}");
|
||||
}
|
||||
}
|
||||
|
||||
behat_base::type_keys($this->getSession(), $keys);
|
||||
|
Loading…
x
Reference in New Issue
Block a user