mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-75913 behat: Switch to TinyMCE editor iframe
This commit is contained in:
parent
7f6d6d240f
commit
94b98082a3
@ -461,4 +461,21 @@ class behat_editor_tiny extends behat_base implements \core_behat\settable_edito
|
||||
$this->execute('behat_general::i_click_on', [$button, 'NodeElement']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Switch to the TinyMCE iframe using a selector.
|
||||
*
|
||||
* @param string $editorlocator
|
||||
*
|
||||
* @When /^I switch to the "(?P<editorlocator_string>(?:[^"]|\\")*)" TinyMCE editor iframe$/
|
||||
*/
|
||||
public function switch_to_tiny_iframe(string $editorlocator): void {
|
||||
$this->require_tiny_tags();
|
||||
|
||||
// Get the iframe name for this editor.
|
||||
$iframename = $this->get_editor_iframe_name($editorlocator);
|
||||
|
||||
// Switch to it.
|
||||
$this->execute('behat_general::switch_to_iframe', [$iframename]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user