Unable to access a button that is located in the header of a SharedHeaderFormEditor. [message #662214] |
Tue, 29 March 2011 14:24  |
Eclipse User |
|
|
|
I'm unable to access a button that is located in the header of a SharedHeaderFormEditor.
I tried several ways, they all fail. For example:
- SWTBotButton generateCodeButton1 = swtWorkbenchBot.button("Generate Code");
(raises an unfound widget exception)
- Matcher matcher = allOf(widgetOfType(Button.class),
withMnemonic("Generate Code"), withStyle(SWT.PUSH, "SWT.PUSH"));
List<Widget> widgets = swtWorkbenchBot.getFinder().findControls(matcher);
(returns an empty list)
I would appreciate any help
---------------------------------------------
Note that when I use the SpyView I can see that the button is located at:
Location:
//Shell/-1//Composite/4//Composite/0//Composite/12//Composit e/0//Composite/0//SashForm/0//ScrolledForm/0//Form/0//FormHe ading/0//ToolBar/1//Button/0
Layout Information:
Button {Generate Code}
Style: PUSH | CENTER | LEFT_TO_RIGHT
Layout Data: null
Bounds: Rectangle {0, 0, 109, 22}
Children: 0
Siblings: 2
[*]Button {Generate Code}: Layout Data: null
Button {Support}: Layout Data: null
Parent Tree:
ToolBar {}[1]@
Layout: null
LayoutData: null
FormHeading {}[0]@
Layout: FormHeading$FormHeadingLayout
LayoutData: null
Form {}[0]@
Layout: Form$FormLayout
LayoutData: null
ScrolledForm {}[0]@
Layout: ScrolledCompositeLayout
LayoutData: SashFormData
SashForm {}[0]@
Layout: SashFormLayout
LayoutData: null
Composite {}[0]@
Layout: FillLayout
LayoutData: null
Composite {}[0]@
Layout: FillLayout
LayoutData: null
Composite {}[12]@
Layout: null
LayoutData: null
Composite {}[0]@
Layout: null
LayoutData: null
Composite {}[4]@
Layout: StackLayout
LayoutData: null
Shell {CCS Edit - ccs-c6flo...}[-1]@
Layout: TrimLayout
LayoutData: null
[Updated on: Tue, 29 March 2011 14:33] by Moderator
|
|
|
Re: nable to access a button that is located in the header of a SharedHeaderFormEditor. [message #663099 is a reply to message #662214] |
Sun, 03 April 2011 11:25  |
Eclipse User |
|
|
|
Do you have a screenshot showing the widget you're trying to identify ?
It would also be helpful to know a few of the ways to access the widget
that failed.
--
Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot | @ketanpkr
On 3/29/11 11:24 AM, Zakdad wrote:
> I'm unable to access a button that is located in the header of a
> SharedHeaderFormEditor.
>
> I tried several ways, they all fail.
>
> I would appreciate any help
>
> When I use the SpyView I can see that the button is located at:
>
>
> Location: //Shell/-1//Composite/4//Composite/0//Composite/12//Composit
> e/0//Composite/0//SashForm/0//ScrolledForm/0//Form/0//FormHe
> ading/0//ToolBar/1//Button/0
>
> Layout Information: Button {Generate Code}
> Style: PUSH | CENTER | LEFT_TO_RIGHT Layout Data: null
> Bounds: Rectangle {0, 0, 109, 22}
>
>
> Children: 0
>
> Siblings: 2
> [*]Button {Generate Code}: Layout Data: null
> Button {Support}: Layout Data: null
>
> Parent Tree:
> ToolBar {}[1]@
> Layout: null
> LayoutData: null
> FormHeading {}[0]@
> Layout: FormHeading$FormHeadingLayout
> LayoutData: null
> Form {}[0]@
> Layout: Form$FormLayout
> LayoutData: null
> ScrolledForm {}[0]@
> Layout: ScrolledCompositeLayout
> LayoutData: SashFormData
> SashForm {}[0]@
> Layout: SashFormLayout
> LayoutData: null
> Composite {}[0]@
> Layout: FillLayout
> LayoutData: null
> Composite {}[0]@
> Layout: FillLayout
> LayoutData: null
> Composite {}[12]@
> Layout: null
> LayoutData: null
> Composite {}[0]@
> Layout: null
> LayoutData: null
> Composite {}[4]@
> Layout: StackLayout
> LayoutData: null
> Shell {CCS Edit - ccs-c6flo...}[-1]@
> Layout: TrimLayout
> LayoutData: null
>
|
|
|
Powered by
FUDForum. Page generated in 0.03556 seconds