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:
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
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.
What am I missing?
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.
I tried the remoteClipboard(5) command and it did not help.
I am running mac 10.4.8. Is the 10.4.9 issue a problem on 8 as well? When is a fix expected for this?
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.
You may want to try the following…
- Disable Rich Clipboard on Vine Server
- 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)
I hope this helps.
Are you running a desktop server (on a user account) or a system server (on the machine as a whole, outside the accounts)?
If it’s the latter, switching to the former might help.
It’s actually a Mac OS X security issue; they don’t allow you to use a clipboard outside the user accounts.