// find the html element
HtmlElement he = instance.ActiveTab.FindElementByTag("input:text", 0);
// check the element
if (!he.IsVoid)
{
// focus on this element
he.Focus();
// send text
string result = Emulator.SendText(instance.ActiveTab.Handle, "Simple text");
// send result
if (result == "ok" && !Emulator.ErrorDetected) return "Key was sent";
return "Fail";
}
return "Element not found";
// find the html element
$he = $instance->ActiveTab->FindElementByTag("input:text", 0);
// check the element
if (!$he->IsVoid)
{
// focus on this element
$he->Focus();
// send text
$result = ZennoLab\Emulation\Emulator::SendText($instance->ActiveTab->Handle, "Simple text");
// send result
if ($result == "ok" && !ZennoLab\Emulation\Emulator::ErrorDetected) return "Key was sent";
return "Fail";
}
return "Element not found";