Hi,
> Is there a way within Keyword tests to copy the text of a project variable and then paste that into the field?
Most probably, you will have to use the RunCodeSnippet operation, and you may consider copying/pasting into field from clipboard as a possible option.
Something like this in pseudo-code:
var oField = ... // set a reference to the required field
oField.Click(); // this will set a focus to a field
oField.Keys("^[Home][P200]^![End][Del]"); // select all text in a field and delete it. "^A[Del]" might work as well
var strValue = getRandomString(5000); // your custom function that will return 5000 characters-long random string
var oClp = Sys.Clipboard; // preserve current value of clipboard
Sys.Clipboard = strValue; // stores strValue into clipboard. This line of code must immediately precede the next one to lower the chance of clipboard content corruption
oField.Keys("^V"); // paste from the clipboard via Ctrl-V shortcut
Sys.Clipboard = oClp; // restore clipboard
var strActualValue = oField.wText; // get actual value from a field
// do whatever verifications against strValue and strActualValue