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 19:39 Go to next message
Kai Schlamp is currently offline Kai Schlamp
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 19:52 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
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] Tue, 24 March 2009 21:30 Go to previous message
Kai Schlamp is currently offline Kai Schlamp
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: Tue Jul 29 15:04:51 EDT 2014

Powered by FUDForum. Page generated in 0.11107 seconds