getValue(); } /** * Get value of Multiline element. * * @return string */ public function getValue() { return $this->query('xpath:./input[@type="hidden"]')->one()->getValue(); } /** * Open Multiline editing overlay dialog. * * @return COverlayDialogElement */ public function edit() { $this->query('xpath:.//button[@type="button"]')->one()->click(); return $this->query('xpath://div[contains(@class, "multilineinput-modal")]')->waitUntilVisible()->asOverlayDialog()->one()->waitUntilReady(); } /** * Clear Multiline input element from data. * * @return $this */ public function clear() { $dialog = $this->edit(); $dialog->query('xpath:.//textarea[contains(@class, "multilineinput-textarea")]')->one()->clear(); $dialog->query('button:Apply')->one()->click(); return $this; } /** * Overwrite value in Multiline input. * * @param $text text to be written into the field * * @return $this */ public function overwrite($text) { $dialog = $this->edit(); $dialog->query('xpath:.//textarea[contains(@class, "multilineinput-textarea")]')->one()->overwrite($text); $dialog->query('button:Apply')->one()->click(); $dialog->waitUntilNotPresent(); return $this; } /** * @inheritdoc */ public function type($text) { self::onNotSupportedMethod(__FUNCTION__); } /** * @inheritdoc */ public function sendKeys($text) { self::onNotSupportedMethod(__FUNCTION__); } /** * @inheritdoc */ public function selectValue() { self::onNotSupportedMethod(__FUNCTION__); } /** * @inheritdoc */ public function isEnabled($enabled = true) { $is_enabled = parent::isEnabled($enabled) && !array_intersect( ['multilineinput-disabled', 'multilineinput-readonly'], explode(' ', $this->getAttribute('class')) ); return $is_enabled === $enabled; } }