How to determine button is available or not [message #716648] |
Wed, 17 August 2011 21:45  |
Eclipse User |
|
|
|
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?
|
|
|
Re: How to determine button is available or not [message #718030 is a reply to message #716648] |
Tue, 23 August 2011 00:46   |
Eclipse User |
|
|
|
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.03723 seconds