Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Close and open the workbench in a test(How to close and open the workbench while running a test?)
Close and open the workbench in a test [message #521883] Fri, 19 March 2010 07:02 Go to next message
Mohsin  is currently offline Mohsin Friend
Messages: 5
Registered: March 2010
Junior Member

I am trying to evaluate SWTBot for automating the eclipse related tests.
Most of my tests require require closing and opening the workbench during the test. Does any one know how this can be achieved?

I tried the using the restart(File->Restart) option available in eclipse but after restarting, the test starts executing from the beginning.

doThis_1;"File").menu("Restart").click(); // after restarting the test starts executes the statement "do_This_1" instead of "do_This_2"



I would really appreciate any workaround/suggestion to this problem.

Re: Close and open the workbench in a test [message #554994 is a reply to message #521883] Wed, 25 August 2010 06:46 Go to previous messageGo to next message
Tim S is currently offline Tim SFriend
Messages: 7
Registered: August 2010
Junior Member
I'm also wondering if there's a way to achieve this. If anyone has an idea, please share!
Re: Close and open the workbench in a test [message #559972 is a reply to message #554994] Mon, 20 September 2010 15:09 Go to previous message
Victor  is currently offline Victor Friend
Messages: 16
Registered: June 2010
Junior Member
In my tests I need to restart the workbench too. I noticed that the test runs from the beginning after the restart, so I did a "control file" that I can read this file and know where I left the test.
During the execution of the test, I write some codes in the file, like numbers, and then I read and compare the code. For example:

if(readCodeFromFile() == 0)


if(readCodeFromFile() == 1)



I tried to switch the workspace too, but I could not do it. I tried to click on File->Switch Workspace, but it did not work.
If someone knows how to do it, please let us know.

Hope it helps.

Previous Topic:GEF GraphicalViewer within a dialog
Next Topic:InvalidThreadAccess when starting SWTBot in headless mode
Goto Forum:

Current Time: Sun Jun 24 06:51:23 GMT 2018

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

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

Back to the top