Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » addition to locate arrow buttons (proposed code to locate an arrow button)
addition to locate arrow buttons [message #494050] Wed, 28 October 2009 22:50 Go to next message
Jay Norwood is currently offline Jay NorwoodFriend
Messages: 155
Registered: July 2009
Senior Member
I needed something to press an arrow button in a custom widget. I ended up adding an arrowButton lookup in SWTBot. Is there some reason this style wasn't being supported? Maybe the style should be passed around as a parameter to all the other forms of button lookup.

public SWTBotButton arrowButton(int index) {
Matcher matcher = allOf(widgetOfType(Button.class), withStyle(SWT.ARROW, "SWT.ARROW"));
return new SWTBotButton((Button) widget(matcher, index), matcher);
}
Re: addition to locate arrow buttons [message #494056 is a reply to message #494050] Thu, 29 October 2009 01:39 Go to previous message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
It's not just about the SWT.ARROW style, the drop down and event
notifications for arrow buttons is different from normal buttons.

One would need an SWTBotArrowButton for an arrow button

--
Ketan
studios.thoughtworks.com | twitter.com/ketanpkr
-

When does later become never?
On 29/10/09 4:20 AM, Jay Norwood wrote:
> I needed something to press an arrow button in a custom widget. I ended
> up adding an arrowButton lookup in SWTBot. Is there some reason this
> style wasn't being supported? Maybe the style should be passed around as
> a parameter to all the other forms of button lookup.
>
> public SWTBotButton arrowButton(int index) {
> Matcher matcher = allOf(widgetOfType(Button.class), withStyle(SWT.ARROW,
> "SWT.ARROW"));
> return new SWTBotButton((Button) widget(matcher, index), matcher);
> }
>
Previous Topic:How to Maximize/Restore/Minimize Views?
Next Topic:typeText switching shells
Goto Forum:
  


Current Time: Fri Apr 19 09:47:09 GMT 2024

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

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

Back to the top