mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-60078 behat: Convert ErrorException to DriverException
This commit is contained in:
parent
60ce5848f6
commit
0cc0f72ceb
1 changed files with 4 additions and 4 deletions
|
@ -1651,12 +1651,12 @@ class behat_general extends behat_base {
|
||||||
* @param string $not optional step verifier
|
* @param string $not optional step verifier
|
||||||
* @param string $nodeelement Element identifier
|
* @param string $nodeelement Element identifier
|
||||||
* @param string $nodeselectortype Element type
|
* @param string $nodeselectortype Element type
|
||||||
* @throws ErrorException If not using JavaScript
|
* @throws DriverException If not using JavaScript
|
||||||
* @throws ExpectationException
|
* @throws ExpectationException
|
||||||
*/
|
*/
|
||||||
public function the_focused_element_is($not, $nodeelement, $nodeselectortype) {
|
public function the_focused_element_is($not, $nodeelement, $nodeselectortype) {
|
||||||
if (!$this->running_javascript()) {
|
if (!$this->running_javascript()) {
|
||||||
throw new ErrorException('Checking focus on an element requires JavaScript');
|
throw new DriverException('Checking focus on an element requires JavaScript');
|
||||||
}
|
}
|
||||||
list($a, $b) = $this->transform_selector($nodeselectortype, $nodeelement);
|
list($a, $b) = $this->transform_selector($nodeselectortype, $nodeelement);
|
||||||
$element = $this->find($a, $b);
|
$element = $this->find($a, $b);
|
||||||
|
@ -1684,12 +1684,12 @@ class behat_general extends behat_base {
|
||||||
* @param string $selectortype Element type
|
* @param string $selectortype Element type
|
||||||
* @param string $nodeelement Element we look in
|
* @param string $nodeelement Element we look in
|
||||||
* @param string $nodeselectortype The type of selector where we look in
|
* @param string $nodeselectortype The type of selector where we look in
|
||||||
* @throws ErrorException If not using JavaScript
|
* @throws DriverException If not using JavaScript
|
||||||
* @throws ExpectationException
|
* @throws ExpectationException
|
||||||
*/
|
*/
|
||||||
public function the_focused_element_is_in_the($not, $element, $selectortype, $nodeelement, $nodeselectortype) {
|
public function the_focused_element_is_in_the($not, $element, $selectortype, $nodeelement, $nodeselectortype) {
|
||||||
if (!$this->running_javascript()) {
|
if (!$this->running_javascript()) {
|
||||||
throw new ErrorException('Checking focus on an element requires JavaScript');
|
throw new DriverException('Checking focus on an element requires JavaScript');
|
||||||
}
|
}
|
||||||
$element = $this->get_node_in_container($selectortype, $element, $nodeselectortype, $nodeelement);
|
$element = $this->get_node_in_container($selectortype, $element, $nodeselectortype, $nodeelement);
|
||||||
$xpath = addslashes_js($element->getXpath());
|
$xpath = addslashes_js($element->getXpath());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue