Skip to main content



      Home
Home » Eclipse Projects » RCP Testing Tool » [SOLVED] Swing control interaction
[SOLVED] Swing control interaction [message #1468954] Tue, 11 November 2014 02:17 Go to next message
Eclipse UserFriend
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 03:21] by Moderator

Re: Swing control interaction [message #1469010 is a reply to message #1468954] Tue, 11 November 2014 03:14 Go to previous messageGo to next message
Eclipse UserFriend
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 04:26 Go to previous messageGo to next message
Eclipse UserFriend
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] Thu, 09 March 2017 23:56 Go to previous message
Eclipse UserFriend
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: Sat Jul 05 01:30:32 EDT 2025

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

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

Back to the top