Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Cant Access Errormessage
Cant Access Errormessage [message #517810] Tue, 02 March 2010 09:04 Go to next message
Thomas Py is currently offline Thomas PyFriend
Messages: 6
Registered: January 2010
Junior Member
HI
i´m trying to test a rcp-application, there are two types of a messageshell(which is not extending shell, it´s not even extending anything). if the info-messagebox(with an ok-button) occurs i can still access it and close it by click the button automatically, but if the errormessage occurs the swtbot seems to wait for something. even the included timeout is reacting untill i close the message manually. how can i acces such a "non"-widget?
i already learned here in the forum the function "allOf(widgetOfType())..." but this seems not to be a widget
can anyone help me here?
thnx



EDIT:
ok, now to the strange thing-> if the same errormessage occurs at another point of the program , i can close it, bot.activeShell is then:"
Shell with text {Shell {Could not delete ent...}}" .. but it is only another instance of the same messageshell

[Updated on: Tue, 02 March 2010 10:00]

Report message to a moderator

Re: Cant Access Errormessage [message #517920 is a reply to message #517810] Tue, 02 March 2010 14:31 Go to previous messageGo to next message
Pascal G is currently offline Pascal GFriend
Messages: 157
Registered: July 2009
Senior Member
Thomas Py wrote:
> but if the errormessage occurs the swtbot seems to wait for something. even the
> included timeout is reacting untill i close the message manually.

This looks like a thread issue to me... if the SWTBot timeout does not
trigger, then it means that the thread SWTBot runs on is waiting for the
UI thread for some reason. May be a syncExec(), or it may be some kind
of lock, or it may even be that you are accessing something in the
SWTBot thread that should be accessed in the UI thread. Whichever it is,
it's a non-trivial matter. Just make sure that if you want to access
something in the UI thread you are using asyncExec, or syncExec if you
care about the returned value. Other then that, I can't really help you
without more details...

> how can i acces such a "non"-widget? i already learned here in the forum the
> function "allOf(widgetOfType())..." but this seems not to be a widget
> can anyone help me here?

You can't. If your "widget" is not in the widget hierarchy then you
can't access it. In the same way you can't access JFace objects...
probably that your "errormessage" class contains some SWT widget, which
you can access. If there is a pop-up, then there is definitely a Shell
somewhere.

Hope this helps.
--
Pascal Gélinas | Software Developer
*Nu Echo Inc.*
http://www.nuecho.com/ | http://blog.nuecho.com/

*Because performance matters.*
Re: Cant Access Errormessage [message #518153 is a reply to message #517810] Wed, 03 March 2010 09:57 Go to previous message
Thomas Py is currently offline Thomas PyFriend
Messages: 6
Registered: January 2010
Junior Member
ok thnx
i already thought of an thread issue, but i cant fix it with my poor knowledge. i also cant post the code here. so i´m writing tests for all other features and at the end i spent some time in fixing this errormessage-error ..
but thnx for your reply

Previous Topic:MenuItem disposed
Next Topic:JUnit as dependency for SWTBot features?
Goto Forum:
  


Current Time: Fri Apr 26 11:58:38 GMT 2024

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

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

Back to the top