If I understand the question right, you are asking how to write SenseTalk code to interact with the remote file system. SenseTalk instructions do not pass across the VNC connection; only mouse and keyboard events are sent to the remote system. All that is returned to Eggplant is a picture of the current state of the remote system’s user interface. Eggplant scripts always interact with the remote system through the UI; they do not perform direct access/manipulation of the remote system. You could write code like your example to interact with the filesystem local to the Eggplant machine, but to do what you ask on the remote machine, there are at least two approaches:
- Create a script to navigate the file system via Windows Explorer and look for a previously captured image of the filename you are looking for. For example (quoted strings are image names):
if not ImageFound("logfileDocument") then
put "File does not exist"
put "File exists"
or your script could access the Command Prompt and use TypeText commands to complete the task:
TypeText "cd C:\\Documents and Settings\\user1\\Desktop\\"
TypeText "DIR /A-D"
// At this point you could look for an image of the filename,
// or you could select the output from the previous command
// using the Drag command, copy it to the clipboard, pull that
// information into Eggplant using the RemoteClipboard() function,
// and parse the text for the filename.
Please note the use of the double backslashes in the directory path above. Eggplant’s TypeText command uses the backslash to indicate an escape sequence, so you’ll need two in a row to generate a single backslash from TypeText.
I hope this clarifies things for you. Please let us know if you have any other questions.