Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Possible timing issues with opening shells and button clicks for the shell
Possible timing issues with opening shells and button clicks for the shell [message #7809] Tue, 09 December 2008 17:32 Go to next message
Joe Luebker is currently offline Joe LuebkerFriend
Messages: 36
Registered: July 2009
Member
Hello,

Here is a very simple test class:

public void testDummy1() throws Exception
{
bot.menu("Run").menu("Open Run Dialog...").click();

// Wait for the Channel Manager shell to open.
//bot.shell("Channel Manager");

bot.button("Close").click();
}

Originally I assumed that I would have to wait for the shell to open
before attempting to click any buttons on the shell. I then commented
out the wait for the shell and haven't ran into any problems where the
button click occurred before the shell was opened.

Is it a legitimate concern to worry about the shell not being opened
before the button click is processed? Or is SWTBot designed such that it
will prevent this from ever happening?

Thanks,
Joe
Re: Possible timing issues with opening shells and button clicks for the shell [message #7871 is a reply to message #7809] Tue, 09 December 2008 23:57 Go to previous message
Ketan Patel is currently offline Ketan PatelFriend
Messages: 68
Registered: July 2009
Member
I think I would do something like this:

public void testDummy1() throws Exception
{
bot.menu("Run").menu("Open Run Dialog...").click();

// Wait for the Channel Manager shell to open and activate.
bot.shell("Channel Manager").activate();

bot.button("Close").click();
}

Just seems like what user would be doing. Open the shell, wait for it,
activate it, and click close. This seem more reliable also because if you
don't wait for the shell and there is Close button is available on the
active shell then it will invoke that and not the one on the shell you
opened (assuming that is what you want to do).
Previous Topic:use matcher in my test
Next Topic:test a dialog in my rcp application
Goto Forum:
  


Current Time: Mon Sep 27 23:45:41 GMT 2021

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

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

Back to the top