One of our Codeception acceptance test steps does this:
$data = file_get_contents( 'file_with_data.txt" );$I->fillField( 'ID of textarea', $data );
"file_with_data.txt" has 1 line with 350,600 chars (serialized php array)
This takes 20+ minutes Its not a blocking issue, we can work around it.
But I just want to understand the technical part of things - what is going on under the hood here - why does this take such a long time?
Not much happens in Codeception or php-webdriver library.
It just makes an HTTP request to /session/:sessionId/keys.Slow thing is probably interaction between Selenium and browser.Try using different browsers and see how they perform.
I assume that even in real life no one will press +350k keys, so it will be more likely a copy&paste command.So you should put your file content into the clipboard buffer and past it into your field that should speed up the process by skipping the iterations over DriverCommand::SEND_KEYS_TO_ACTIVE_ELEMENTExample of code (note tested):
$data = file_get_contents('file_with_data.txt');
$I->executeJS("copy('$data')"); // maybe buffer issue with 350k characters
$I->pressKey('ID of textarea',