Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Accessing wizard error/warning messages?
Accessing wizard error/warning messages? [message #478978] Fri, 07 August 2009 18:48 Go to next message
Richard Adams is currently offline Richard AdamsFriend
Messages: 77
Registered: July 2009
Location: Edinburgh
Member
Hello,
I am writing some swtbot tests involving wizards and I want to test that
the correct warning/error messages are generated that appear at the top of
the wizard( i.e., those provided by wizPage.setError(message). I've spent
some time trying to loop through text & label widgets without any success,
has anyone come across how to do this?

I access the wizard like this, as a shell:


bot.menu(OPTIMIZE_MENU).menu(REMOTE_OPTIMIZE_SUBMENU).click( ); // handler
launches wizard
bot.shell(RemoteOptimizationHandler.WIZARD_TITLE).activate() ; //
activate wizard

Any help appreciated! Thanks Richard


Re: Accessing wizard error/warning messages? [message #538339 is a reply to message #478978] Mon, 07 June 2010 12:19 Go to previous messageGo to next message
ashitha shetty is currently offline ashitha shettyFriend
Messages: 17
Registered: March 2010
Junior Member
Hi ,

I am trying to do the same- access the error messages displayed in a dialog. Is there a way to do this?

None of the options below work:
bot.label(message);
bot.text(message);
bot.textWithMessage(message);

Regards,
Ashitha.

[Updated on: Mon, 07 June 2010 12:21]

Report message to a moderator

Re: Accessing wizard error/warning messages? [message #538380 is a reply to message #538339] Mon, 07 June 2010 13:56 Go to previous messageGo to next message
Pascal G is currently offline Pascal GFriend
Messages: 157
Registered: July 2009
Senior Member
On 10-06-07 08:19 AM, ashitha wrote:
> Hi ,
>
> I am trying to do the same- access the error messages displayed in a
> dialog. Is there a way to do this?
>
> None of the options below work:
> bot().label(message);
> bot().text(message);
> bot().textWithMessage(message);
>
> Regards,
> Ashitha.

There is a big catch in this. Look at
TitleAreaDialog#setErrorMessage(String), line 388: there is a space
added a the beginning of the error message! So you gotta do:
bot.text(" " + errorMessage);

Keep on testing!
--
Pascal Gélinas | Software Developer
*Nu Echo Inc.*
http://www.nuecho.com/ | http://blog.nuecho.com/

*Because performance matters.*
Re: Accessing wizard error/warning messages? [message #538382 is a reply to message #538380] Mon, 07 June 2010 14:15 Go to previous message
ashitha shetty is currently offline ashitha shettyFriend
Messages: 17
Registered: March 2010
Junior Member
Hi Pascal,

Although I did look at the TitleAreaDialog class, I overlooked this very important detail. Thanks for your help!

Regards,
Ashitha.
Previous Topic:Not able to access Context Menu for tree
Next Topic:568-dev-e34.zip missing org.eclipse.swtbot.eclipse.ui_2.0.0.568-dev-e34.jar
Goto Forum:
  


Current Time: Fri Apr 19 16:05:53 GMT 2024

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

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

Back to the top