Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » [Maven/Tycho] First editor activation event not delivered?
[Maven/Tycho] First editor activation event not delivered? [message #1415134] Tue, 02 September 2014 06:59 Go to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
Hi,
I have the following scenario:
- Starting a SWTBot Test from command line via maven/tycho
- in the setup of the test method an editor is opened
- some asserts fail as there is no "active editor"

Workaround is to activate another part and re-activate the editor.
From within the IDE everything is ok.

It seems that the first editor activation event is not properly delivered.
I have registered a part listener at workbench start up and, indeed, IPartListener#partActivated(IWorkbenchPart) method is never called.

Does this sound familiar to anyone else or anyone has some hints?

Target platform: Kepler with SWTBot 2.1.1

Thanks.
Re: [Maven/Tycho] First editor activation event not delivered? [message #1416216 is a reply to message #1415134] Thu, 04 September 2014 15:39 Go to previous message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Maybe you need to explicit wait for the expected editor to open?
bot.waitUntil(new ICondition() { public boolean test() {
bot.activeEditor() != null; });

--
Mickael Istria
My job: http://www.jboss.org/tools
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Previous Topic:java.lang.NoClassDefFoundError when using bot.waitUntil(ICondition)
Next Topic:How to click a button under a CTabFolder?
Goto Forum:
  


Current Time: Tue Mar 19 09:22:22 GMT 2024

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

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

Back to the top