Your e-Business Quality Partner eValid™ -- Automated Web Quality Solution
Browser-Based, Client-Side, Functional Testing & Validation,
Load & Performance Tuning, Page Timing, Website Analysis,
and Rich Internet Application Monitoring.

eValid -- Copy/Paste Alternative
eValid Home

Problem Description
There are several other methods for accomplishing a Copy/Paste operation on a web page. The approach used here involves these steps:

  1. Write the data that is to be pasted into a local file with a SaveSelectedText command.
  2. Manipulate the string of data so that it will be appropriate as a $NAME=value substitution.
  3. Use the !<filename> command to pass the dynamic value to a script that accepts the data as a parameter.

Here is a step by step illustration.

  1. Saving Data Locally
    This command passage might be something like this:
    GotoLink ""
    SaveSelectedText 0 "Extract" 75 0 25 ""

  2. Create The Input File
    Here we manipulate the contents of the file so that it has the correct $NAME=value format. This is done by prefixing the $NAME= string to the saved string so that the resulting file has the required $NAME=Value format.
    SaveMesssage "Front.file.txt"  "$NAME="
    SystemCallWait "cmd /c /b \"Front.file.txt\"+\"Extract.txt\" \"Actual.txt\" "

    Note that the system call is made to the Windows command line processor, cmd and the options which follow it are instructions to justapose the two file fragments into the required format. The same system call could be used to invoke, for example, a PERL script that could perform more complicated processing.

  3. Pass the Data
    Here the called script file has to have $NAME in the place where the passed value is going to be used.
    CallScript Secondary.evs "!Actual.txt"

Additional Comments
This kind of operation will be desktop safe because it does not require use of the desktop. This operation may not be loadtest safe because two or more instances of the same script running in parallel may both use the copy command at the same time, but this could be overcome by bracketing the SystemCallWait command with Lock/Unlock.