Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » expandNode with 0 delays(a possible solution for expandNode with 0 Playback delays)
expandNode with 0 delays [message #498391] Mon, 16 November 2009 17:34
Jay Norwood is currently offline Jay NorwoodFriend
Messages: 112
Registered: July 2009
Senior Member
I came upon a sequence that appears to avoid putting in arbitrary sleep() times for those expandNode calls that take a long time to complete and sometimes get stuck.

i had previously put in the SWTBotTreeItem.getParent() function to back up to a node's parent. I find now that using it has worked consistently to get rid of stuck expandNode calls. For example, the Run/Debug expandNode would frequently get stuck in the test when expanding, but with the repeat expandNode following the .getParent() in the code below, I haven't had it stuck now for the two weeks I've been using it with 0 PLAYBACK_DELAY. Maybe there would be a use for this sort of recovery in a waitUntil test, because I've found that once stuck the expandNode failure doesn't recover with just repeated tests with just sleep().


// Open the global preferences panel through the toolbar
bot.menu("Window").menu("Preferences").click();
SWTBotShell prefsShell = bot.shell("Preferences");
prefsShell.activate();

// Get a particular preference panel setting through the global preferences panel tree
SWTBotTreeItem treeItem = bot.tree().expandNode("Run/Debug").getParent().expandNode( "Run/Debug").select().click();
Previous Topic:button.click() => IndexOutOfBoundsException
Next Topic:Product installation test
Goto Forum:
  


Current Time: Fri Dec 19 09:34:06 GMT 2014

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

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