puphpeteer icon indicating copy to clipboard operation
puphpeteer copied to clipboard

Copy text from textarea to variable

Open zloyfenix opened this issue 3 years ago • 1 comments

Good afternoon, for several days I have been trying to find a solution on how to implement copying text from a text area to a variable, I will be very grateful to you for a hint on how this can be implemented, I tried this code, but it does not work for me

$text = $page->evaluate(JsFunction::createWithParameters(['document'])
	->body('return document.getElementById("tText").value;'));

zloyfenix avatar Feb 15 '22 19:02 zloyfenix

$page->evaluate(JsFunction::createWithParameters("document") ->body('return document.getElementById("Text").value;'));

PJTH3G0D avatar Aug 16 '22 20:08 PJTH3G0D