protected function FeatureContext::getWysiwygInstance in Open Social 10.0.x
Same name and namespace in other branches
- 8.9 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::getWysiwygInstance()
- 8.3 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::getWysiwygInstance()
- 8.4 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::getWysiwygInstance()
- 8.5 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::getWysiwygInstance()
- 8.6 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::getWysiwygInstance()
- 8.7 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::getWysiwygInstance()
- 8.8 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::getWysiwygInstance()
- 10.3.x tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::getWysiwygInstance()
- 10.1.x tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::getWysiwygInstance()
- 10.2.x tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::getWysiwygInstance()
Get the wysiwyg instance variable to use in Javascript.
Parameters
string: The instanceId used by the WYSIWYG module to identify the instance.
Return value
string A Javascript expression representing the WYSIWYG instance.
Throws
Exception Throws an exception if the editor does not exist.
1 call to FeatureContext::getWysiwygInstance()
- FeatureContext::iFillInTheWysiwygEditor in tests/
behat/ features/ bootstrap/ FeatureContext.php - @When /^I fill in the "([^"]*)" WYSIWYG editor with "([^"]*)"$/
File
- tests/
behat/ features/ bootstrap/ FeatureContext.php, line 88
Class
- FeatureContext
- Defines application features from the specific context.
Namespace
Drupal\social\BehatCode
protected function getWysiwygInstance($instanceId) {
$instance = "CKEDITOR.instances['{$instanceId}']";
if (!$this
->getSession()
->evaluateScript("return !!{$instance}")) {
throw new \Exception(sprintf('The editor "%s" was not found on the page %s', $instanceId, $this
->getSession()
->getCurrentUrl()));
}
return $instance;
}