Skip to main content



      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 18:50 Go to next message
Eclipse UserFriend
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] Wed, 28 October 2009 21:39 Go to previous message
Eclipse UserFriend
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: Sat Jun 14 01:14:16 EDT 2025

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

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

Back to the top