Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » [SOLVED]How check clipboard?(=>With my custom ecl command)
icon5.gif  [SOLVED]How check clipboard? [message #1439869] Tue, 07 October 2014 16:10 Go to next message
Francis BACQUET is currently offline Francis BACQUETFriend
Messages: 46
Registered: September 2014
Member
Hello,

In my application, some actions copy the value in clipboard. I would check this actions but i don't know how manipulate clipboard from Rcptt.
Do you have a idea?

Thanks you for advance.

[Updated on: Tue, 28 October 2014 21:26]

Report message to a moderator

Re: How check clipboard? [message #1444684 is a reply to message #1439869] Tue, 14 October 2014 12:02 Go to previous messageGo to next message
Olga Yurchuk is currently offline Olga YurchukFriend
Messages: 245
Registered: September 2014
Senior Member

Hello!

Unfortunately now the only way to check a clipboard context is to paste data somewhere.
If untitled text files are supported by yours AUTs, the following procedure can be used:

proc "assert-clipboard" [val expected] {
	get-menu "File/New/Untitled Text File" | click
	// .* used because each consequent creation of new untitled 
	// text file creates autoincremented index (i.e. 'Untitled 1',
	// 'Untitled 2', etc.)
	get-editor "Untitled .*" | get-text-viewer | key-type "M1+v"
	get-editor "Untitled .*" | get-text-viewer | get-property text | equals $expected | verify-true	
	get-editor "Untitled .*" | close
	try {
		get-window "Save Resource" | get-button No | click
	} -catch {
		// catch block here is because when clipboard is empty
		// untitled text file will be unmodified, so no save resource
		// window would appear
	}
}

assert-clipboard "<content of clipboard>" 


Yours sincerely,
Olga.
Re: How check clipboard? [message #1445340 is a reply to message #1444684] Wed, 15 October 2014 09:57 Go to previous messageGo to next message
Francis BACQUET is currently offline Francis BACQUETFriend
Messages: 46
Registered: September 2014
Member
Hello Olga,

thanks for your answer.
Unfortunately, untitled text files aren't supported by my AUT.
I tested on a editbox, but 'key-type "M1+v"' don't function with my AUT (Editbox overrided on my project, Editbox doesn't to be behaving normally with rcptt)
proc "assert-clipboard" [val expected] {
        //I store editbox's content
	get-editbox | get-property text | let [val acteVente -input] {
		with [get-editbox] {
			set-text ""
			//it's ignore by my AUT...
			key-type "M1+v"
			get-property text | equals $expected | verify-true
                        //I restore editbox's content
			set-text $acteVente
		}
	}
}

assert-clipboard 1484


I will create native command rcptt with EMF. And I will be share here. Smile

[Updated on: Wed, 15 October 2014 11:51]

Report message to a moderator

icon9.gif  Re: How check clipboard? [message #1452504 is a reply to message #1445340] Sat, 25 October 2014 12:02 Go to previous message
Francis BACQUET is currently offline Francis BACQUETFriend
Messages: 46
Registered: September 2014
Member
This my custom ecl command, to manipulate the clipboard.

To use this jar, you need to add in <your aut>/dropins/plugins.

[Updated on: Fri, 31 October 2014 12:19]

Report message to a moderator

Previous Topic:[SOLVED] How to use relative path from Context Folders
Next Topic:[SOLVED] How to select an Checkbox in Table without index
Goto Forum:
  


Current Time: Sat Apr 20 02:34:42 GMT 2024

Powered by FUDForum. Page generated in 0.03124 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top