|
Re: How to determine button is available or not [message #718030 is a reply to message #716648] |
Tue, 23 August 2011 04:46 |
Ketan Padegaonkar Messages: 873 Registered: July 2009 |
Senior Member |
|
|
On 8/17/11 6:45 PM, Joanna wrote:
> Hi~
> I want to use SWTBot as nightly automation test tool, but i encountered
> an issue. In our test, for some case a dialog box with 2 buttons will
> popup, for some case they will not popup, if dialog popups, we need
> click on a button and continue. Currently i tried to use
> if(bot.button("Yes").isVisible()) to determine whether there is dialog
> box or not, but WidgetNotFoundException came up, anyone knows how to
> handle this case?
For any dialogs or popup windows that come up, a good way to make sure
they have focus is to perform shell.activate() before performing any
further actions on the shell.
-- Ketan
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02885 seconds