Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBot couldn't find widget -- random
SWTBot couldn't find widget -- random [message #667517] Fri, 29 April 2011 10:17 Go to next message
shawn  is currently offline shawn Friend
Messages: 9
Registered: February 2011
Junior Member
Hi, could someone give me a help ?

I'm using swtbot to test a RCP application, but I got a big problem ...
swtbot sometimes couldn't find a simple widget, like "Text", "Menu" ...

I wrote this :
bot.menu("label").click(); ...
bot.textWithLabel("label").setText("...");
sometimes, these work well, but sometimes will throw "Widget not found exception.." Sad
I did nothing when running swtbot and kept the rcp application in front and focus on
Re: SWTBot couldn't find widget -- random [message #668561 is a reply to message #667517] Fri, 06 May 2011 08:55 Go to previous messageGo to next message
Felix Lu is currently offline Felix LuFriend
Messages: 12
Registered: April 2011
Junior Member
You can use the waitUntil() method to ensure that the dialog has been opened.

bot.waitUntil(new DefaultCondition() {
			public boolean test() {
				return SOME_CONDITION;
			}
			public String getFailureMessage() {
				return "Dialog XXX not opened.";
			}
		});
Re: SWTBot couldn't find widget -- random [message #674180 is a reply to message #668561] Thu, 26 May 2011 03:27 Go to previous messageGo to next message
shawn  is currently offline shawn Friend
Messages: 9
Registered: February 2011
Junior Member
Yeah, tried with your help ..
but just sometimes will work .. strange !
however, thanks for your reply !
Re: SWTBot couldn't find widget -- random [message #676930 is a reply to message #667517] Tue, 07 June 2011 02:07 Go to previous message
Lycos  is currently offline Lycos Friend
Messages: 1
Registered: June 2011
Junior Member
If you perform multiple test cases, previous test case can have an impact on next test cases.
For example, previous test case fails. so, opened dialog box was not closed.
when you perform the next test cases, the dialog box still remains.
Previous Topic:Not able to launch my plugin application with bot
Next Topic:How to navigate through various tabs in Eclipse search menu
Goto Forum:
  


Current Time: Tue Mar 19 02:49:21 GMT 2024

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

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

Back to the top