Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » How to wait for a MessageDialog to appear?
How to wait for a MessageDialog to appear? [message #30292] Wed, 25 March 2009 11:32 Go to next message
Anders Baumann is currently offline Anders BaumannFriend
Messages: 55
Registered: July 2009
Hello there!
How do I wait for a MessageDialog to appear? I just want to wait for it to
appear and then click on the "Ok" or "Cancel" button. At the moment I am
using the SWTBotFactory.sleep method, but that seems kind of random.

Thanks in advance,
Anders Baumann
Re: How to wait for a MessageDialog to appear? [message #30436 is a reply to message #30292] Wed, 25 March 2009 23:18 Go to previous message
Ketan Patel is currently offline Ketan PatelFriend
Messages: 68
Registered: July 2009
There are few options; you can wait for the shell
SWTBotShell shell ="Title");

or you can use predefined conditions in Contditions class:

You can look at the SWTBot tests for examples. Here is one case which
deletes project, which waits for shell a80f69f05c99c346/org.eclipse.swtbot.eclipse.finder.test/src/ org/eclipse/swtbot/eclipse/finder/widgets/helpers/PackageExp
Previous Topic:EclipseCon 2009 tutorial update
Next Topic:Where to post bugs?
Goto Forum:

Current Time: Sat Oct 10 07:01:17 GMT 2015

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

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