Rene,
Nothing in SenseTalk is designed to directly affect the SUT. The commands described in the Eggplant Reference manual however, can interact directly with the SUT but from the user interface only. However, you can use the file system commands to operate on files on the SUT if you first mount the SUT’s file system on the Eggplant machine.
If the remote filesystem is mounted on the local machine (using “Connect to Server…” from the Go menu in the Finder) then the remote files will be available to the script just like local files. In this case, you would need to replace “~/Desktop/” with the path to the mounted file system.
If you need to, you can even mount the SUT’s file system dynamically from within a script by using the “shell” command to run the Unix mount command. There are actually two steps required: 1) create a directory (usually in /Volumes) to provide a mount point and 2) execute the mount command with the appropriate options. This code creates a mount point, mounts a local Mac OS X server on my machine, and then unmounts it:
make directory “/Volumes/serverMount”
shell “mount_afp afp://username:password@SUTmachine/SUTVolume /Volumes/serverMount”
if the result is not equal to 0 then
logError “Could not mount server”
exit all
end if
– Perform SUT File System Operations Here
shell “umount /Volumes/serverMount”
if the result is not equal to 0 then
LogWarning “Server was not unmounted”
end if
Note that the “umount” command (and no, it’s not “unmount”) removes the directory you created for the mount point, as does any other method of unmounting the volume, so you’ll need to recreate the directory each time you need to run the mount command (you might want to make that a function or helper script).