I am trying to get the contents of a field for validation. The remoteClipboard() function is not working correctly for me though. I have run this function when the SUT is windows and it works fine. However, when my SUT is mac it does not work.
Here is the code snippet:
DoubleClick “domainField”
Typecommand a
Typecommand c
put remoteClipboard() into theField
log "theField is: " & theField
The log does not have the field contents. I believe the problem is in the remoteClipboard() function because I did a test where I just ran the
Typecommand a
Typecommand c
And then I manually opened a text file on the SUT and did a ‘paste’ and the text I was expecting was in the clipboard.
It’s possible that you are accessing the remoteClipboard() before the SUT has had time to register that something new has been copied to the clipboard. If that’s the case, specifying a time value should help:
put remoteClipboard(5) into theField
This will put Eggplant on notice that it should be expecting to see new clipboard contents, and tell it to wait up to 5 seconds to receive the new clipboard from the SUT.
There is a posted problem with remote clipboard and mac OS 10.4.9 near the top of the forums.
I had some problems on windows ( see my topic " At Wit’s end"), when my app crashed, VNC lost the ability to send clip data to the host, it was able to receive clip data sent from the host however, so it was a bit of a puzzle. WHen the next build was issued the problem “went away” ( I also moved my entire EP enviornment back to 10.4.3) but in the end I didn’t gainmuch ground, with the current build the app crashes so hard it can’t recover ( but it doesn’t hose the ability to send the clip data to the EP host, so at least I can email the bug report data into our database), the SUT needs a hard start after that crash, can’t wait to see what happens at the next build.
The issues we were seeing turned out not to be related to 10.4.9 after all, so feel free to upgrade your Mac (see Jonathan’s follow-up post on that topic). There are some occasional problems with clipboards in the current release of Eggplant, which have been corrected for the 4.0 release (if you have the 4.0 beta, please let us know if you are still seeing any problems).
In the meantime, if you are connecting to a Mac SUT, try disabling rich clipboard support (on the Sharing tab) in Vine Server on the SUT – that may help.
Toggle Rich Cursors to Off in Eggplant VNC Preferences
(in 3.3x there is a bug, you must toggle an encoding to get the cursor setting to stick, fixed in 4.0)
When working with data transfer to the Mac, it helps to have one, and only one VNC connection open (the system clipboard gets out of sync and confused, thus causing problems, addressed in 4.0)