public function VarbaseContext::iFillInFieldUnderTheEditorMediaBrowser in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.7
Same name and namespace in other branches
- 8.8 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iFillInFieldUnderTheEditorMediaBrowser()
- 8.4 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iFillInFieldUnderTheEditorMediaBrowser()
- 8.5 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iFillInFieldUnderTheEditorMediaBrowser()
- 8.6 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iFillInFieldUnderTheEditorMediaBrowser()
- 9.0.x tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iFillInFieldUnderTheEditorMediaBrowser()
#varbase : To fill in a form field with id|name|title|alt|value under the editor media browser.
Example: I fill in "flag earth" for "File name" under the editor media browser
@When /^(?:|I )fill in "(?P<field>(?:[^"]|\\")*)" with "(?P<value>(?:[^"]|\\")*)" under (?:|the )editor media browser$/ @When /^(?:|I )fill in "(?P<field>(?:[^"]|\\")*)" with: under (?:|the )editor media browser$/ @When /^(?:|I )fill in "(?P<value>(?:[^"]|\\")*)" for "(?P<field>(?:[^"]|\\")*)" under (?:|the )editor media browser$/
File
- tests/
features/ bootstrap/ VarbaseContext.php, line 350
Class
- VarbaseContext
- Defines application features from the specific context.
Code
public function iFillInFieldUnderTheEditorMediaBrowser($field, $value) {
// Switch to the "entity_browser_iframe_editor_media_browser" iframe.
$this
->getSession()
->switchToIFrame('entity_browser_iframe_editor_media_browser');
$field = str_replace('\\"', '"', $field);
$value = str_replace('\\"', '"', $value);
$this
->getSession()
->getPage()
->fillField($field, $value);
// Switch back too the page from the "entity_browser_iframe_editor_media_browser" iframe.
$this
->getSession()
->switchToIFrame(null);
}