Skip to main content


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
Member
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
Member
There are few options; you can wait for the shell
SWTBotShell shell = bot.shell("Title");

or you can use predefined conditions in Contditions class:
bot.waitUntil(Conditions.shellCloses(shell));

You can look at the SWTBot tests for examples. Here is one case which
deletes project, which waits for shell

http://github.com/ketan/swtbot/blob/ee2821dd5a298f8af2cd606c a80f69f05c99c346/org.eclipse.swtbot.eclipse.finder.test/src/ org/eclipse/swtbot/eclipse/finder/widgets/helpers/PackageExp lorerView.java
Previous Topic:EclipseCon 2009 tutorial update
Next Topic:Where to post bugs?
Goto Forum:
  


Current Time: Wed Apr 24 22:23:13 GMT 2024

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

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

Back to the top