Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » [SOLVED] Swing control interaction
[SOLVED] Swing control interaction [message #1468954] Tue, 11 November 2014 07:17 Go to next message
Nam Ha is currently offline Nam HaFriend
Messages: 4
Registered: November 2013
Junior Member
Hi Everybody,
I'm investigating the RCPTT to test my RCP application. In my project, I have some swing components inside swt control. I used record feature of RCPTT but seem that it doesn't know swing.
Does anybody know how can I touch those swing controls via ECL? or any possible way? Can I use custom ECL to do this?

[Updated on: Wed, 30 September 2015 07:21] by Moderator

Report message to a moderator

Re: Swing control interaction [message #1469010 is a reply to message #1468954] Tue, 11 November 2014 08:14 Go to previous messageGo to next message
Ivan Inozemtsev is currently offline Ivan InozemtsevFriend
Messages: 0
Registered: January 2015
Hi Nam,

Overall, RCPTT is not aware about Swing at all and unfortunately at the moment we have no plans in adding support for it. By writing custom ECL commands, basically it is possible to do everything you can do in Java code, so I think you should be able to interact with Swing controls via API too.

As a 'bridge' between RCPTT commands and your custom commands you might find useful commands like "get-object" and "invoke", to minimize the amount of logic in your custom commands. For example, if a swing is embedded inside some group, you can do something like this to pass a reference to SWT group composite
get-editor "Foo" | get-group "My group"  | get-object // use RCPTT selection commands and "extract" SWT object from result 
   | your-command-to-find-swing-button  // your custom command to find embedded swing in SWT control and to find an element in swing frame
   | invoke doClick // call Swing API method via reflection


Just curious, how much Swing UI do you have embedded into SWT and how much do you need to interact with it?
Re: Swing control interaction [message #1469074 is a reply to message #1469010] Tue, 11 November 2014 09:26 Go to previous messageGo to next message
Nam Ha is currently offline Nam HaFriend
Messages: 4
Registered: November 2013
Junior Member
Thank you, Ivan Inozemtsev
I have a lot of swing controls like text area, text field, buttons, combobox, dialog... but I don't know yet how much deep I might touch. Now I know one ability to get the swing components in RCPTT. Thanks
Re: Swing control interaction [message #1756010 is a reply to message #1469010] Fri, 10 March 2017 04:56 Go to previous message
Yogendra Sharma is currently offline Yogendra SharmaFriend
Messages: 1
Registered: March 2017
Junior Member
Hi,
I have an swt button when we click on button a new window will popup. this window is swing window.

how can I get this swing window object using get-object?
because when I click on swt button after clicking rcptt doesn't recognize swing window.

please give a sample example using get-object & invoke to get swing component. its very helpful for all.

Previous Topic:Timming issue in the test case
Next Topic:How to Upper Case or to Lower Case Function
Goto Forum:
  


Current Time: Thu Sep 19 05:05:25 GMT 2024

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

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

Back to the top