Remote clipboard contains stale contents

I am having issues with the remote clipboard. My eggplant code is as follows:

SetRemoteClipboard "empty"

TypeText controlKey, "c"
Log RemoteClipboard()

I ran this code while having a SUT open with an application running and a cursor in a textbox containing the highlighted word “Hello”. When I run this code, the output is as expected. If I run it a second (or more) time, the output is “empty”. This is happening in other scripts as well.

I’m using EggPlant 20.1 and my SUT is Windows 10.

Many thanks!

Hi,

its just one option.

can you add some hard wait before you do control+c & use the remoteclipboard(2) with optional wait time.
http://docs.eggplantsoftware.com/ePF/SenseTalk/stk-keyboard-clipboard-events.htm

thanks,
Vinay

1 Like

Thank you for your reply!

So adding a hard wait just gives me a new error:

FAILURE Screen_Error.png Error Running Script Command remoteclipboard Error -
No new clipboard info retrieved within 2.00 seconds
– Execution Time 0:00:04 Automated_Tests/Vertical_Regression/Untitled1.script

This is my script now:

Repeat 2 times
	SetRemoteClipboard "empty"
	Wait 2
	TypeText controlKey, "c"
	Log RemoteClipboard(2)
End Repeat

Again, the SUT simply contains an open notepad document containing the word “Hello”.

Many thanks!

Hi,

You need to add wait after “Typetext controlkey,c”. Currently the issue is because, you have hard wait before the copy & trying to look at clipboard previous 2 seconds . Since there is no data in clip board, it should return empty.

Try once adding wait 3 after copy.
Repeat 2 times
SetRemoteClipboard “empty”
TypeText controlKey, “c”
Wait 2
Log RemoteClipboard(2)
End Repeat

Secondly , check the windows rdpclip.exe is running, if any process killing this will cause clipboard not to work. You can start this just by enter this in run window before execution.

Hope it will help you.

Thanks,
Vinay

1 Like

Hello Cdm2003

Did you have any luck with clearing the contents of the clipboard before the next value is entered ?

I am facing an issue where the clipboard contains stale values for next time when a value from clipboard is compared with a value entered in the input field it returns an error because the match is done against a stale value(which should have been cleared).

Hope that makes sense.
Regards

Hi Neel,

Let me know whether this meets your needs.

log remoteclipboard(5) //Returns content from the remote clipboard that was added by events executed against the SUT in the previous 5 seconds

Thanks,
Dave