|
|
Re: widget with parent [message #19274 is a reply to message #18576] |
Mon, 02 February 2009 23:57 |
Ketan Patel Messages: 68 Registered: July 2009 |
Member |
|
|
For example,
To find a button, there are lots of APIs, bot.button("test"), in SWTBot,
which will search the active shell.
But with now if you want to search for a button in eclipse view or editor,
you can use bot.button("test"), but it would be more reliable to says
bot.button("test", viewOrEditorControl) so it will search for the button
under viewOrEditorControl.
I mean using bot.button("test") will work but don't know what is going to
happen if there is one or more other views open with "test" button. This
would apply to all the APIs for finding widgets.
Right now what you have to do is, copy or create the matcher for button or
widget you are looking for and use the
org.eclipse.swtbot.swt.finder.SWTBotFactory.widget(Matcher<? >, Widget)
method. But thought might be easy to add code to automatically generate
these extra APIs to help reduce having to copy/recreating matchers for
common widgets.
Ketan Padegaonkar wrote:
> Hi Ketan,
> I did not quite understand that, could you elaborate with an example of
> the API you're looking for ?
> -- Ketan
|
|
|
|
|
Re: widget with parent [message #19411 is a reply to message #19274] |
Tue, 03 February 2009 04:05 |
Ketan Padegaonkar Messages: 873 Registered: July 2009 |
Senior Member |
|
|
On 3/2/09 05:27, Ketan Patel wrote:
> For example, To find a button, there are lots of APIs,
> bot.button("test"), in SWTBot, which will search the active shell.
> But with now if you want to search for a button in eclipse view or
> editor, you can use bot.button("test"), but it would be more reliable to
> says bot.button("test", viewOrEditorControl) so it will search for the
This could mean that the API exactly doubles, and this particular use
case includes a lot of people, using this api not so frequently.
Could this be the case of another class (call it SWTBotParent or
something) and provides a the same api as SWTBot with additional parameter ?
While this API would be useful, I'm just thinking about the sheer number
of proposals the user would see when he types in a bot.button (it is
currently pegged at 20 per widget)
-- Ketan
|
|
|
|
Powered by
FUDForum. Page generated in 0.04264 seconds