Widget <-> View (ID) [message #648303] |
Wed, 12 January 2011 05:37  |
Eclipse User |
|
|
|
For various resons, a method that receives a Widget object needs to find out if this widget belongs to a view, and if so, what ID it has.
I found no really good solution to get this info. I tried using the debugger to see if it was stored in any widget data field or similar, but I haven't been able to find anything. Anyone?
|
|
|
|
|
Re: Widget <-> View (ID) [message #648549 is a reply to message #648499] |
Thu, 13 January 2011 08:26  |
Eclipse User |
|
|
|
On 01/13/2011 04:21 AM, PigsAngel wrote:
> Thanks, I suspected that was the answer.
>
> This information would be useful for simplifying the writing of GUI test
> cases, but I presume we have to find other ways to solve this.
If you know before hand, you can set IDs on your widgets and use them in
your UI test cases.
i.e. in your viewpart, you create buttons and use
button.setData("test.id", "button1")
Then when walking your view, you can find "button1" for your tests and
when button 1 is clicked you can check that ID in your tests, etc.
Depending on the size of your app, you might only want to set the data
when in test mode.
PW
--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
|
|
|
Powered by
FUDForum. Page generated in 0.04019 seconds