Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Unable to access a button that is located in the header of a SharedHeaderFormEditor.
Unable to access a button that is located in the header of a SharedHeaderFormEditor. [message #662214] Tue, 29 March 2011 18:24 Go to next message
Abu Zak is currently offline Abu Zak
Messages: 11
Registered: February 2010
Junior Member
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 18:33]

Report message to a 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 15:25 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
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
>
Previous Topic:java .setData
Next Topic:Doubleclick doesn't work on a empty SWTBotTable
Goto Forum:
  


Current Time: Sat Oct 25 19:52:35 GMT 2014

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

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