We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c783449 commit 17fd818Copy full SHA for 17fd818
src/lib/Behat/Component/Fields/RichText.php
@@ -50,9 +50,16 @@ private function focusFieldInput(): void
50
51
public function setValue(array $parameters): void
52
{
53
- $this->executeCommand('selectAll');
54
- $this->executeCommand('delete');
55
- $this->getFieldInput()->setValue($parameters['value']);
+ $text = $parameters['value'];
+ $maxIterations = 3;
+ $counter = 0;
56
+ while ($this->getValue()[0] !== $text && $counter < $maxIterations) {
57
+ $this->executeCommand('selectAll');
58
+ $this->executeCommand('delete');
59
+ $this->getFieldInput()->setValue($parameters['value']);
60
+ usleep(100 * 1000); // 100 ms
61
+ ++$counter;
62
+ }
63
}
64
65
public function getValue(): array
0 commit comments