M
M
matperez2015-05-05 17:26:45
PHPUnit
matperez, 2015-05-05 17:26:45

How to highlight text in input in codeception?

Hello!
There is some bug that appears if you open the order form, enter something in the text input and select it with the mouse. I want to write a test for it. How to open the form and enter text clearly:

$I->click(['link' => 'Заказать']);
$I->waitForElement('#order-comment', 5);
$I->fillField('#order-comment', 'test comment');

How can I highlight the entered text?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
matperez, 2015-05-05
@matperez

That's how it happened

$I->click(['link' => 'Заказать']);
$I->waitForElement('#order-comment', 5);
$I->fillField('#order-comment', 'test comment');
$I->executeJS('document.getElementById("order-comment").select();');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question