This doesn't yet have official support in the Drupal Extension. The linked thread has some examples that use traits.
However, I found this gist by johnennewdeeson to be a faster, easier solution for me, just cut and paste into FeatureContext.php
:
/**
* @Then I fill in wysiwyg on field :locator with :value
*/
public function iFillInWysiwygOnFieldWith($locator, $value) {
$el = $this->getSession()->getPage()->findField($locator);
if (empty($el)) {
throw new ExpectationException('Could not find WYSIWYG with locator: ' . $locator, $this->getSession());
}
$fieldId = $el->getAttribute('id');
if (empty($fieldId)) {
throw new Exception('Could not find an id for field with locator: ' . $locator);
}
$this->getSession()
->executeScript("CKEDITOR.instances[\"$fieldId\"].setData(\"$value\");");
}