Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Display not found in framework
Display not found in framework [message #1415637] Wed, 03 September 2014 08:37 Go to next message
Shwetali Dhumal is currently offline Shwetali DhumalFriend
Messages: 12
Registered: August 2014
Junior Member
Hi,

I am trying to test GUI based application in swtbot. I am executing the test cases through testng framework. But i am getting following error.Can any one help me so i can go further implementation.


Thanks in advance

java.lang.IllegalStateException: Could not find a display
at org.eclipse.swtbot.swt.finder.utils.SWTUtils.display(SWTUtils.java:250)
at org.eclipse.swtbot.swt.finder.finders.ControlFinder.<init>(ControlFinder.java:83)
at org.eclipse.swtbot.swt.finder.finders.ControlFinder.<init>(ControlFinder.java:73)
at org.eclipse.swtbot.swt.finder.swtbot.<init>(swtbot.java:115)
at org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot.<init>(SWTWorkbenchBot.java:61)
at temp.NewTest.beforeClass(NewTest.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:175)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:107)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Re: Display not found in framework [message #1416220 is a reply to message #1415637] Thu, 04 September 2014 15:44 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Is the Eclipse Workbench already started at that time?
You need to make sure Eclipse UI and SWT are ready to work before
starting your test.

--
Mickael Istria
My job: http://www.jboss.org/tools
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: Display not found in framework [message #1419891 is a reply to message #1416220] Tue, 09 September 2014 08:14 Go to previous messageGo to next message
Shwetali Dhumal is currently offline Shwetali DhumalFriend
Messages: 12
Registered: August 2014
Junior Member
Hi Mickael,

I m new for the swtbot. I m not getting your answer exactly what to check.
How to verify Eclipse UI and SWT are ready to work?

Thanks for the reply
Re: Display not found in framework [message #1421403 is a reply to message #1419891] Thu, 11 September 2014 10:17 Go to previous messageGo to next message
pawan garia is currently offline pawan gariaFriend
Messages: 39
Registered: February 2013
Member
Its Better if you use the Junit Plugin Test to Run the Swtbot Tests.
Re: Display not found in framework [message #1461189 is a reply to message #1421403] Tue, 04 November 2014 09:45 Go to previous message
Shweta Dhumal is currently offline Shweta DhumalFriend
Messages: 5
Registered: November 2014
Junior Member
Hi Pawan,

Thanks for the reply but there are some advance annotations provided in TestNG framework(like @Beforetest) those are not supported in Junit.
Previous Topic:Context Menu on CDT expressions view ( Luna and SWTBot2.2.1)
Next Topic:wait for the project complete
Goto Forum:
  


Current Time: Thu Apr 25 04:14:19 GMT 2024

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

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

Back to the top