Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » how to access toggle button
how to access toggle button [message #30006] Tue, 24 March 2009 23:39 Go to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Hy again.

When I define a button as SWT.TOGGLE instead of SWT.PUSH, it seems
SWTBot doesn't find that button anymore by bot.button()
(WidgetNotFoundException). Is there a way to access it with SWTBot?

Best regards,
Kai
Re: how to access toggle button [message #30107 is a reply to message #30006] Tue, 24 March 2009 23:52 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
Hi Kai,

There's no support for push buttons in swtbot, you may look at
SWTBotCheckbox to see how you may implement toggle buttons. I think
you'll merely need to copy/paste the implementation for all of it.

-- Ketan

On 24/3/09 16:39, Kai Schlamp wrote:
> Hy again.
>
> When I define a button as SWT.TOGGLE instead of SWT.PUSH, it seems
> SWTBot doesn't find that button anymore by bot.button()
> (WidgetNotFoundException). Is there a way to access it with SWTBot?
>
> Best regards,
> Kai
Re: how to access toggle button [message #30143 is a reply to message #30107] Wed, 25 March 2009 01:30 Go to previous message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Yes it seems straight forward to implement this.
I hope it will also be in the official SWTBot.
I open an enhancement request
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=269919)
Something like bot.toggleButton() would be nice.

Kai


Ketan Padegaonkar schrieb:
> Hi Kai,
>
> There's no support for push buttons in swtbot, you may look at
> SWTBotCheckbox to see how you may implement toggle buttons. I think
> you'll merely need to copy/paste the implementation for all of it.
>
> -- Ketan
>
> On 24/3/09 16:39, Kai Schlamp wrote:
>> Hy again.
>>
>> When I define a button as SWT.TOGGLE instead of SWT.PUSH, it seems
>> SWTBot doesn't find that button anymore by bot.button()
>> (WidgetNotFoundException). Is there a way to access it with SWTBot?
>>
>> Best regards,
>> Kai
>
Previous Topic:Simulate mouse click on Zest Graph control.
Next Topic:Constructor of WaitForShell is package private
Goto Forum:
  


Current Time: Thu Apr 25 05:24:57 GMT 2024

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

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

Back to the top