Using Eclipse Library for GUI testing.

198 views
Skip to first unread message

Ganesh Kumbhar

unread,
Feb 6, 2015, 1:20:30 AM2/6/15
to robotframework-ec...@googlegroups.com
Hi Everyone,

I am using RF standalone jar file & not much familiar with RF, using just from 3 months.
Now I got new requirement for GUI testing, So i am using eclipse library.
I couldn't get much information about Eclipse library, but whatever i got from  internet & from our group, I tried it (i.e made all settings as per mentioned).
I think it " Start Eclipse"  works & during that call I am getting below exception.


Timeout reached before end of initialization Check if EclipseLibrary plugin is installed Or use -timeout option in Start Eclipse keyword
11:29:54.469 DEBUGjava.lang.RuntimeException: at org.robotframework.javalib.library.AnnotationLibrary.retrieveInnerException(AnnotationLibrary.java:93) at org.robotframework.javalib.library.AnnotationLibrary.runKeyword(AnnotationLibrary.java:75) at org.lcx.robotframework.eclipse.EclipseLibrary.runKeyword(EclipseLibrary.java:59) at robot.model.testcase$py.visit$7(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/testcase.py:64) at robot.model.testcase$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/testcase.py) at robot.model.itemlist$py.visit$10(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/itemlist.py:58) at robot.model.itemlist$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/itemlist.py) at robot.model.visitor$py.visit_suite$2(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/visitor.py:22) at robot.model.visitor$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/visitor.py) at robot.model.testsuite$py.visit$19(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/testsuite.py:152) at robot.model.testsuite$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/testsuite.py) at robot.model.itemlist$py.visit$10(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/itemlist.py:58) at robot.model.itemlist$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/itemlist.py) at robot.model.visitor$py.visit_suite$2(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/visitor.py:22) at robot.model.visitor$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/visitor.py) at robot.model.testsuite$py.visit$19(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/testsuite.py:152) at robot.model.testsuite$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/testsuite.py) at robot.run$py.main$3(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/run.py:410) at robot.run$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/run.py) at robot.utils.application$py._execute$11(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/utils/application.py:98) at robot.utils.application$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/utils/application.py) at robot.utils.application$py.execute_cli$5(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/utils/application.py:45) at robot.utils.application$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/utils/application.py) at robot.run$py.run_cli$7(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/run.py:434) at robot.run$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/run.py) at robot.jarrunner$py._run$3(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/jarrunner.py:60) at robot.jarrunner$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/jarrunner.py) at robot.jarrunner$py.run$2(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/jarrunner.py:53) at robot.jarrunner$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/jarrunner.py) at org.robotframework.RobotFramework.run(RobotFramework.java:63) at org.robotframework.RobotFramework.main(RobotFramework.java:37) Caused by: org.lcx.robotframework.eclipse.bridge.SWTBotBridgeException: Timeout reached before end of initialization Check if EclipseLibrary plugin is installed Or use -timeout option in Start Eclipse keyword at org.lcx.robotframework.eclipse.keyword.launch.EclipseLaunchingKeywords.startEclipseInSeparateThread(EclipseLaunchingKeywords.java:123) at org.lcx.robotframework.eclipse.keyword.launch.EclipseLaunchingKeywords.startEclipse(EclipseLaunchingKeywords.java:39) at org.robotframework.javalib.reflection.KeywordInvoker.invoke(KeywordInvoker.java:49) at org.robotframework.javalib.beans.annotation.AnnotationKeywordExtractor$1.execute(AnnotationKeywordExtractor.java:55) at org.robotframework.javalib.library.KeywordFactoryBasedLibrary.runKeyword(KeywordFactoryBasedLibrary.java:37) at org.robotframework.javalib.library.AnnotationLibrary.runKeyword(AnnotationLibrary.java:73) ... 168 more


I am using  eclipselibrary-0.20-with-dependencies-swt.jar jar file for eclipse. 

Below lines are content of my batch file named "eclipsebot.bat".

@echo off
set ECLIPSE_LIBRARY=lib/eclipselibrary-0.20-with-dependencies-swt.jar
set ROBOTFRAMEWORK=lib/robotframework-2.8.6.jar
"jre7u51\bin\java.exe" -Xmx3072m -Xms256m -Xbootclasspath/a:%ECLIPSE_LIBRARY% -jar  %ROBOTFRAMEWORK% --debugfile jybot.log --loglevel DEBUG --outputdir results %* 

And I call this batch file as "eclipsebot.bat A_TestEclipseLibrary_installation.html"

I attached A_TestEclipseLibrary_installation.html file with this for reference, I made settings as per mentioned.


So Pls help me to get through this problem.

Thank You,
Ganesh.


A_TestEclipseLibrary_installation.html

Ganesh Kumbhar

unread,
Feb 6, 2015, 1:56:32 AM2/6/15
to robotframework-ec...@googlegroups.com
Hi again, 

I have attached one zip file containing log files & A_TestEclipseLibrary_installation.html,  which may be needed for understanding the problem neatly.  
log_files.7z

Laurent Carbonnaux

unread,
Feb 6, 2015, 3:28:48 AM2/6/15
to robotframework-ec...@googlegroups.com
Hello Ganesh,

Did you installed EclipseLibrary plugin in your Eclipse?

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "robotframework-eclipselibrary-users".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse robotframework-eclipsel...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

Ganesh Kumbhar

unread,
Feb 6, 2015, 6:36:50 AM2/6/15
to robotframework-ec...@googlegroups.com
Hello Laurent,
  Thanks for quick reply.
  I tried adding it through install new software, but it is giving error, snap of it is attached with this,
  Pls have a look & suggest some solution for that.
I am not able to add any of plugin.



--
Vous recevez ce message, car vous êtes abonné à un sujet dans le groupe Google Groupes "robotframework-eclipselibrary-users".
Pour vous désabonner de ce sujet, visitez le site https://groups.google.com/d/topic/robotframework-eclipselibrary-users/i1_CRTS0xVw/unsubscribe.
Pour vous désabonner de ce groupe et de tous ses sujets, envoyez un e-mail à l'adresse robotframework-eclipsel...@googlegroups.com.
gh.png

Laurent Carbonnaux

unread,
Feb 6, 2015, 8:38:01 AM2/6/15
to robotframework-ec...@googlegroups.com
Oh yes, I see what's going on, SourceForge has deleted project sites, so no more files are available.
Let me take some time to correct this.

Regards,
Laurent.

Ganesh Kumbhar

unread,
Feb 6, 2015, 12:56:43 PM2/6/15
to robotframework-ec...@googlegroups.com
Yes, Pls

And getting same problem with SWTBot plugin at "http://download.eclipse.org/technology/swtbot/releases/latest/"

Do I need SWTBot plugin to be installed for GUI testing of Eclipse Applications, developed using SWT widgets ?

Laurent Carbonnaux

unread,
Feb 7, 2015, 2:58:37 AM2/7/15
to robotframework-ec...@googlegroups.com
I'm don't know about SWTBot plugin repository, you may check plugin website.
For both Eclipse apps RCP or SWT, you need SWTBot.
But there is no interest to have an Eclipse apps using SWT, why not doing direct java SWT apps.

Laurent Carbonnaux

unread,
Feb 7, 2015, 4:02:42 AM2/7/15
to robotframework-ec...@googlegroups.com
Hi Ganesh,

In order to help you quicker, please find attached the update site zip file.
You may unzip in a folder and ad to Eclipse as a local update site.

For Eclipse SWT, SWTBot is packaged in the eclipse library jar file (eclipselibrary-0.20-with-dependencies-swt.jar) , no need to add the plugin to your application, but not sure it still works, I didn't use it since a long time ;-)

Regards,
Laurent.

UpdateSite.zip

Laurent Carbonnaux

unread,
Feb 7, 2015, 5:01:28 AM2/7/15
to robotframework-ec...@googlegroups.com
Namaste Ganesh,

Update SIte have been migrated here : http://update-site.scrumvision.org/
Wiki has been udpated so.

Feal free to contact me again in case,

regards,
Laurent.
Message has been deleted

Laurent Carbonnaux

unread,
Feb 7, 2015, 12:19:38 PM2/7/15
to robotframework-ec...@googlegroups.com
Hi Ganesh,

I'm wondering? are you developping a java swing application or an eclipse application using swing widgets?
RF eclipse library is only suitable for eclipse apps using RCP or swing widgets, not for java swing apps.

regards,
Laurent.

2015-02-07 17:31 GMT+01:00 Ganesh Kumbhar <gbkum...@gmail.com>:
Bon soir Laurent,

sorry for late reply actually today i was out thus couldn't check the mail.
    So as you said, i will try using the new updated update-site
I am using "eclipselibrary-0.20-with-dependencies-swt.jar" library only
So i need not to do any other settings for this . right??
surely i need your help as I don't know anything & no one here know much about this.
It's really a great pleasure to meet you & thanx for the last line.

merci beaucoup,
Ganesh,



Ganesh Kumbhar

unread,
Feb 7, 2015, 10:27:21 PM2/7/15
to robotframework-ec...@googlegroups.com
Hi,
     Yes Laurent, I have to test eclipse apps using RCP, swing widgets only.
so i guess,only eclipse library is enough.
I tried Using the new update-site as per you suggested but still I am getting the same error.
So any idea why it is ...   unable to find content.xml ??

Inline image 1

Laurent Carbonnaux

unread,
Feb 8, 2015, 2:55:25 AM2/8/15
to robotframework-ec...@googlegroups.com
Hi Ganesh,
don't you have any proxy or network problem?
Instead use the local update-site I've send.

Ganesh Kumbhar

unread,
Feb 8, 2015, 8:36:10 AM2/8/15
to robotframework-ec...@googlegroups.com
Hi Laurent,
   Don't know about proxy but there shouldn't be any network problem, still i will check it again in office network.

    I tried using local update side, but it's giving error as below

Inline image 2

And we have "org.lcx.robotframework.swtbot_feature_1.5.0.201407191429.jar" file in features folder.
two file "org.lcx.robotframework.swtbot_feature_1.5.0.201407191429.jar" & "org.lcx.robotframework.swtbot_feature.feature.group 1.5.0.201407191429.jar"
are they different ??

So am I missing something or something is missing form updates file ?

Thanlks & Regards,
Ganesh.

Laurent Carbonnaux

unread,
Feb 8, 2015, 12:08:01 PM2/8/15
to robotframework-ec...@googlegroups.com
The message says there are missing plugins required, it may be the SWTBot ones, please click on down arrow in "Detail" area bollow "requires"

Ganesh Kumbhar

unread,
Feb 8, 2015, 10:52:23 PM2/8/15
to robotframework-ec...@googlegroups.com
Hi,
   details are as in below snapshot
Inline image 1


"org.lcx.robotframework.swtbot_feature_1.5.0.201407191429.jar" this jar file is there, but it is asking for "bundle.org.eclipse...."

So what can I do for this dependency, that jar contains "feature.xml" file only.

Ganesh Kumbhar

unread,
Feb 9, 2015, 1:45:09 AM2/9/15
to robotframework-ec...@googlegroups.com
Hi again,

I am calling one simple function "Activate C Tab Item" for checking working & i guess it is using Eclipse library but giving an error as below :
  "There's no widget in the context"
and according to the Eclipse Library it doesn't need any argument.
So Is this error is related to Eclipse plugin or any argument needed??
So can you Pls guide me in this case.

Ganesh Kumbhar

unread,
Feb 9, 2015, 1:54:16 AM2/9/15
to robotframework-ec...@googlegroups.com
And this is with runtime exception
Exact error is as below:

20150209 12:18:52.327 - INFO - +---- START KW: EclipseLibrary.Activate C Tab Item [ ]
20150209 12:18:52.338 - FAIL - There's no widget in the context
20150209 12:18:52.339 - DEBUG - java.lang.RuntimeException:
Caused by: org.lcx.robotframework.eclipse.bridge.SWTBotBridgeException: There's no widget in the context
    at org.lcx.robotframework.eclipse.context.Context.getCurrentWidget(Context.java:47)
    at org.lcx.robotframework.eclipse.keyword.swtbot.action.CTabItemActionKeywords.activateCTabItem(CTabItemActionKeywords.java:71)
    at org.robotframework.javalib.reflection.KeywordInvoker.invoke(KeywordInvoker.java:50)

    at org.robotframework.javalib.beans.annotation.AnnotationKeywordExtractor$1.execute(AnnotationKeywordExtractor.java:55)
    at org.robotframework.javalib.library.KeywordFactoryBasedLibrary.runKeyword(KeywordFactoryBasedLibrary.java:37)
    at org.robotframework.javalib.library.AnnotationLibrary.runKeyword(AnnotationLibrary.java:73)
    ... 210 more
20150209 12:18:52.340 - INFO - +---- END KW: EclipseLibrary.Activate C Tab Item (14)


As already told, I am using "eclipselibrary-0.20-with-dependencies.jar" this jar file.

Laurent Carbonnaux

unread,
Feb 9, 2015, 3:58:22 AM2/9/15
to robotframework-ec...@googlegroups.com
Hi Ganesh,
This says you need to install SWTBot plugins.

Laurent Carbonnaux

unread,
Feb 9, 2015, 4:04:23 AM2/9/15
to robotframework-ec...@googlegroups.com
Hi Ganesh,

ElipseLibrary (based on SWTBot constraints) needs first to resolve the widget.
Each time you want to "play" with a widget, you need first to "Find" it.
There should be a Find C Tab keywords somewhere

so you should write something like that :

| Find C Tab Item | "your tab name or id" |
| Activate C Tab Item |

regards,
Laurent

Ganesh Kumbhar

unread,
Feb 9, 2015, 5:48:24 AM2/9/15
to robotframework-ec...@googlegroups.com
Hi Laurent,
Yes I have this library.can I get documentation related to how to use this library
else it's difficult to figure out which function requires what as prerequisite, as i don't know about there use.

Ganesh Kumbhar

unread,
Feb 10, 2015, 3:55:10 AM2/10/15
to robotframework-ec...@googlegroups.com
Hi Laurent,

   As you said "There's no widget in the context" this error is because of "SWTBot plugins" not installed.
I am using local repository for SWTBot (which is attached with this reply), but still it's giving the same error, so am not getting, that anything is missing from repository or repository itself is wrong.
Pls suggest plugin path or something if any.

I tried running some simple functions as below

1) Press Shortcut  ALT+TAB : error: "There's no widget in the context" .. Is here we have to do something before pressing like as you said we need to find tab before activating it? .

Capture Screenshot  file.jpg & 
 | Find C Tab Item | "your tab name or id" |
| Activate C Tab Item |  as you suggested.. 
Find Editor By Label  ProcessingKeywords.txt
Get Eclipse Editor Lines

but It's giving null pointer exception as below ..... so is it because of SWTBotPlugin or something else ??


20150210 14:12:55.889 - INFO - +---- START KW: EclipseLibrary.Find C Tab Item [ ProcessingKeywords.txt ]
20150210 14:12:55.893 - INFO - Instanciation of SWTWorkbenchBot
20150210 14:12:55.900 - FAIL - java.lang.NullPointerException
20150210 14:12:55.900 - DEBUG - java.lang.RuntimeException: 
Caused by: org.lcx.robotframework.eclipse.bridge.SWTBotBridgeException: java.lang.NullPointerException
at org.lcx.robotframework.eclipse.bridge.CauseException.generateException(CauseException.java:37)
at org.lcx.robotframework.eclipse.bridge.SWTBotBridge.callMethod(SWTBotBridge.java:141)
at org.lcx.robotframework.swtbot.eclipse.finder.SWTWorkbenchBot.<init>(SWTWorkbenchBot.java:33)
at org.lcx.robotframework.swtbot.eclipse.finder.SWTWorkbenchBot.getSWTWorkbenchBot(SWTWorkbenchBot.java:23)
at org.lcx.robotframework.eclipse.keyword.swtbot.finder.CTabItemFinderKeywords.findCTabItem(CTabItemFinderKeywords.java:47)
at org.robotframework.javalib.reflection.KeywordInvoker.invoke(KeywordInvoker.java:49)
at org.robotframework.javalib.beans.annotation.AnnotationKeywordExtractor$1.execute(AnnotationKeywordExtractor.java:55)
at org.robotframework.javalib.library.KeywordFactoryBasedLibrary.runKeyword(KeywordFactoryBasedLibrary.java:37)
at org.robotframework.javalib.library.AnnotationLibrary.runKeyword(AnnotationLibrary.java:73)
... 210 more
Caused by: java.lang.NullPointerException
at org.lcx.robotframework.eclipse.bridge.SWTBotBridge.callMethod(SWTBotBridge.java:135)
... 221 more
repository.zip

Laurent Carbonnaux

unread,
Feb 10, 2015, 4:48:39 AM2/10/15
to robotframework-ec...@googlegroups.com
Hi Ganesh,

Could you please send me the log files, your test files, and if possible your application?

Ganesh Kumbhar

unread,
Feb 10, 2015, 6:25:09 AM2/10/15
to robotframework-ec...@googlegroups.com
Hello Laurent,
   
I am not able to send Batch file that I am running to call test case.
that batch content are as below 

@echo off
"jre7u51\bin\java.exe" -Xmx3072m -Xms256m -Xbootclasspath/a:lib\eclipselibrary-0.20-with-dependencies.jar -jar lib\robotframework-2.8.6.jar -d testResult  --debugfile debugFile.txt --timestampoutputs --logtitle VCIntegrationTests_Log --reporttitle VCIntegrationTests_Report --noncritical Run_Qac testcases

zip file attached contains all output files.
and in test files i am simply calling one function in test suit(attached) & in that function trying to use eclipse library keywords.
VC_SCP_TestSuite.txt
testResult.zip

Laurent Carbonnaux

unread,
Feb 10, 2015, 8:45:50 AM2/10/15
to robotframework-ec...@googlegroups.com
Hi Ganesh,

I don't have all your test files, but I can see in the log that you didn't start the bridge between RF and SWTBot.
Please take a look at the very simple test file attached.


SWTSample.html

Ganesh Kumbhar

unread,
Feb 10, 2015, 10:44:22 PM2/10/15
to robotframework-ec...@googlegroups.com
Hi Laurent,
   Actually i have not started implementation part yet, currently I am just trying to understand how to use keywords of eclipse library, so i didn't send you all test files.
I will be starting implementation part may be from tomorrow, but before i want to complete these all environmental setup.
 
About your example, I am not getting what is "fr/valtech/mc/SWTSample" this parameter.
I tried with same, getting error as "ClassNotFoundException".

And while start running "Start SWT Bot Bridge " keyword it gives RuntimeException, complete log file is as below: 

20150211 08:00:04.386 - INFO - +---- START KW: EclipseLibrary.Start SWT Bot Bridge [ ]
20150211 08:00:04.407 - FAIL - SwtbotPlugin for RF on error
20150211 08:00:04.408 - DEBUG - java.lang.RuntimeException:
    at org.robotframework.javalib.library.AnnotationLibrary.retrieveInnerException(AnnotationLibrary.java:93)
    at org.robotframework.javalib.library.AnnotationLibrary.runKeyword(AnnotationLibrary.java:75)
    at org.lcx.robotframework.eclipse.EclipseLibrary.runKeyword(EclipseLibrary.java:59)
.
.
.
  Does it mean I didn't install Swtbot plugin properly ?
  I am using local depository, as update site is not working,
  And repository I am using is attached with this.

repository.zip

Laurent Carbonnaux

unread,
Feb 11, 2015, 12:56:41 AM2/11/15
to robotframework-ec...@googlegroups.com
Hi Ganesh,

fr/valtech/mc/SWTSample is the sample java application using SWT widgets.
This apps have rf plugin jar in its classptah. I have attached sample the application jat and the wstbot.bat is like that:

@echo off
:: set all jar files in the classpath
setlocal EnableDelayedExpansion
set classpath=./
for %%f in (./lib/*.jar) do (set classpath=!classpath!;./lib/%%f)
:: call rf
C:\ProgramData\Oracle\Java\javapath\java -Xmx512m -cp %classpath% org.robotframework.RobotFramework --debugfile jybot.log --loglevel DEBUG --outputdir results %*

then you can start using : swtbot.bat SWTSample.html.

In the SWTSample test : 
...
Set Eclipse Library Log LevelDEBUG
Start Application In Separate Threadfr.valtech.mc.SWTSample
Start SWTBotBridge
Find Text
Set Text Textlolo
Find Button
${text}=Get Button Text
Should Be Equal${text}Valider
Click Button
"Start Application In Separate Thread" keyword lunches the class fr.valtech.mc.SWTSample contained in the attached jar.
"Start SWTBotBridge" make the link between RF and the app
Then you can find a Text, Set he Text to "lolo", find a Button, etc

After you start the application, you need to start the bridge between rf and the application.
If you don't have the applictaion started, you cannot ask keywords to access widgets.

So if yo have not yet an applictaion, that's normal you have problem.

Regards,
Laurent.

SWTSample.jar

Ganesh Kumbhar

unread,
Feb 11, 2015, 2:10:21 AM2/11/15
to robotframework-ec...@googlegroups.com
Hi Laurent,
I tried as per you said but getting error "SwtbotPlugin for RF on error" while running "Start SWTBotBridge", log contents are as below.

20150211 12:17:55.326 - INFO - +--- START KW: EclipseLibrary.Start Application In Separate Thread [ fr.valtech.mc.SWTSample ]
20150211 12:17:55.339 - INFO - +--- END KW: EclipseLibrary.Start Application In Separate Thread (10)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20150211 12:17:55.341 - INFO - +--- START KW: EclipseLibrary.Start SWT Bot Bridge [ ]
20150211 12:17:55.453 - INFO - Exception in thread "Thread-2" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.lcx.robotframework.eclipse.keyword.launch.ApplicationLaunchingKeywords$1.run(ApplicationLaunchingKeywords.java:53)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
    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.lcx.robotframework.eclipse.keyword.launch.ApplicationLaunchingKeywords.launchApplication(ApplicationLaunchingKeywords.java:33)
    at org.lcx.robotframework.eclipse.keyword.launch.ApplicationLaunchingKeywords$1.run(ApplicationLaunchingKeywords.java:51)
    ... 1 more
Caused by: java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
    at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
    at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
    at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
    at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
    at fr.valtech.mc.SWTSample.main(SWTSample.java:17)
    ... 7 more
20150211 12:17:55.491 - FAIL - SwtbotPlugin for RF on error
20150211 12:17:55.493 - DEBUG - java.lang.RuntimeException:
    at org.robotframework.javalib.library.AnnotationLibrary.retrieveInnerException(AnnotationLibrary.java:93)
    at org.robotframework.javalib.library.AnnotationLibrary.runKeyword(AnnotationLibrary.java:75)
    at org.lcx.robotframework.eclipse.EclipseLibrary.runKeyword(EclipseLibrary.java:59)
    at robot.model.testcase$py.visit$7(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/testcase.py:64)
    at robot.model.testcase$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/testcase.py)
    at robot.model.itemlist$py.visit$10(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/itemlist.py:58)
    at robot.model.itemlist$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/itemlist.py)
    at robot.model.visitor$py.visit_suite$2(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/visitor.py:22)
    at robot.model.visitor$py.call_function(/Users/jmalinen/Documents/workspace/robotframework/build/Lib/robot/model/visitor.py)
.
.
.

I guess, "SwtbotPlugin for RF on error" this error is because of not getting Swtbotplugin .. Is it so ??
If yes, what should i do because update site is not working & locally i have that repository, Is that sufficient or are there any dependencies that i am missing ?

And I have one doubt regarding use of eclipse_library jar file ... which jar to be used in batch file "eclipselibrary-0.20-with-dependencies.jar" or "eclipselibrary-0.20-with-dependencies-swt.jar" And
Do we need "eclipselibrary-0.20.jar" also along with dependencies jar ??

On Wed, Feb 11, 2015 at 11:26 AM, Laurent Carbonnaux <laurent.c...@gmail.com> wrote:
Hi Ganesh,

fr/valtech/mc/SWTSample is the sample java application using SWT widgets.
This apps have rf plugin jar in its classptah. I have attached sample the application jat and the wstbot.bat is like that:

@echo off
:: set all jar files in the classpath
setlocal EnableDelayedExpansion
set classpath=./
for %%f in (./lib/*.jar) do (set classpath=!classpath!;./lib/%%f)
:: call rf
C:\ProgramData\Oracle\Java\javapath\java -Xmx512m -cp %classpath% org.robotframework.RobotFramework --debugfile jybot.log --loglevel DEBUG --outputdir results %*

then you can start using : swtbot.bat SWTSample.html.

In the SWTSample test : 
..

Laurent Carbonnaux

unread,
Feb 11, 2015, 2:32:57 AM2/11/15
to robotframework-ec...@googlegroups.com
The error is here : Cannot load 32-bit SWT libraries on 64-bit JVM
Please launch the same using a 32-bit JVM

Ganesh Kumbhar

unread,
Feb 11, 2015, 9:41:35 AM2/11/15
to robotframework-ec...@googlegroups.com
Hello Laurent,

Yes, You were right.
I tried using 32-bit JRE.
so now we are able to
make the link between RF and SWTBot i.e. "Start SWTBotBridge"  keyword running fine.

After that I simply called one function "call eclipse library keywords" from test suit, which is as below:

call eclipse library keywords
   Log To Console  "ok ok"

   Set Eclipse Library Log Level  DEBUG  
   Start Application In Separate Thread  fr.valtech.mc.SWTSample  
   Start SWTBotBridge   
   Run Keyword And Continue On Failure  Find Perspective By Label  CATCH  
   Run Keyword And Continue On Failure  Activate Perspective
   Run Keyword And Continue On Failure  Find View By Title   Project Explorer    
   Show View

For each find keyword it's giving "NoSuchMethodException" exception,
Complete log file is attached with this,
Pls have a look at this log file... Is there any jar missing or what??

Thanks & Regards,
Ganesh
jybot.log

Ganesh Kumbhar

unread,
Feb 12, 2015, 5:54:17 AM2/12/15
to robotframework-ec...@googlegroups.com
Hi again,

   I tried by keeping following jar files in "lib" directory, but still It's giving same error, as in log file which i have sent in last reply.
As error is saying that some method is not found means i guess, some jar may be missing so I tried it as tria, but no effect.. :(

Jar files used just for trial :

eclipselibrary-0.20-with-dependencies-swt.jar
javalib-core-1.0.3.jar
org.eclipse.jface_3.5.2.M20100120-0800.jar
org.eclipse.swtbot.swt.finder_2.2.1.201402241301.jar
org.lcx.robotframework.swtbotplugin_1.5.0.201407191429.jar
robotframework-2.8.6.jar
SWTSample.jar

And I run bat file with "SWTSample.html"
it fails after "SWT Bot Bridge" keyword at "Find text" with below error:

20150212 16:18:36.148 - INFO - +--- START KW: EclipseLibrary.Start SWT Bot Bridge [ ]
20150212 16:18:36.153 - INFO - +--- END KW: EclipseLibrary.Start SWT Bot Bridge (4)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20150212 16:18:36.154 - INFO - +--- START KW: EclipseLibrary.Find Text [ Keywords ]
20150212 16:18:42.006 - FAIL - Could not find widget.
20150212 16:18:42.007 - DEBUG - java.lang.RuntimeException:
Caused by: org.lcx.robotframework.eclipse.bridge.SWTBotBridgeException: Could not find widget.
    at org.lcx.robotframework.eclipse.bridge.CauseException.generateException(CauseException.java:35)

Pls guide me, what should I do ?




Laurent Carbonnaux

unread,
Feb 16, 2015, 1:21:05 PM2/16/15
to robotframework-ec...@googlegroups.com
Hi Ganesh,

In my classpath I have only:

eclipselibrary-0.20-with-dependencies-swt.jar
org.eclipse.jface_3.5.2.M20100120-0800.jar
robotframework-2.7.7.jar
SWTSample.jar

eclipselibrary-0.20-with-dependencies-swt.jar contains SWTBot classes and javalib core.

So I don't know where your problem comes from.
Does the apllication launch? do you see it?

Ganesh Kumbhar

unread,
Feb 17, 2015, 10:33:34 PM2/17/15
to robotframework-ec...@googlegroups.com
Hi Laurent,
      Thanks for reply,
      Yes, I guess Application is launching because some keywords like
       "Set Capture Screenshot On Error", "Set Eclipse Library Log Level" are running fine
       But while running other keywords like Find Active view,Find Active Perspective,List All Perspectives etc. it gives "NoSuchMethodException" exception as below (For "Find Active view"):

Instanciation of SWTWorkbenchBot
 FAIL - java.lang.NoSuchMethodException: org.eclipse.swtbot.swt.finder.SWTBot.activeView()
 DEBUG - java.lang.RuntimeException:
Caused by: org.lcx.robotframework.eclipse.bridge.SWTBotBridgeException: java.lang.NoSuchMethodException: org.eclipse.swtbot.swt.finder.SWTBot.activeView()
Caused by: java.lang.NoSuchMethodException: org.eclipse.swtbot.swt.finder.SWTBot.activeView()
Am I missing something ??

Ganesh Kumbhar

unread,
Feb 17, 2015, 11:01:49 PM2/17/15
to robotframework-ec...@googlegroups.com
And when tried without SWTBotBridge i.e. if removed

 "Start Application In Separate Thread  fr.valtech.mc.SWTSample
    Start SWTBotBridge"
these lines from script, it gives RuntimeException, as below :............. Can you Pls tell me Why do we need this ?

 +----- START KW: EclipseLibrary.Find Active View [ ]

INFO - Instanciation of SWTWorkbenchBot
FAIL - RuntimeException
DEBUG - java.lang.RuntimeException
Caused by: java.lang.NullPointerException
    at org.lcx.robotframework.eclipse.bridge.SWTBotBridge.callMethod(SWTBotBridge.java:102)

    at org.lcx.robotframework.swtbot.eclipse.finder.SWTWorkbenchBot.<init>(SWTWorkbenchBot.java:33)

Here also "Set Capture Screenshot On Error", "Set Eclipse Library Log Level" are running fine.

Laurent Carbonnaux

unread,
Feb 18, 2015, 7:22:45 AM2/18/15
to robotframework-ec...@googlegroups.com
Hi Ganesh,

If you use the SWTSample.html test, after the keyword "Start Application In Separate Thread", you should see the application launched.
Then the birdge is opened using "Start SWTBotBridge"
then it "Find a Text", there is only one text widget in the sample application.
then it set the text of the text field using "Set Text Text" to "lolo"
Then find a buton, set get the name of the button, then click on the button
Then stop the test.

There is only on text field and one button in the sample applictaion, so there is no active view or perspective or whatelse.

You may first use the test and the sample applictaion as is in order to verify everything is working on you computer.

The SWTBotBrige is making the bridge between robotframework and the applictaion.
So if you don't start it, rf won't work.

Let me know,
Laurent.




Laurent Carbonnaux

unread,
Feb 18, 2015, 7:24:07 AM2/18/15
to robotframework-ec...@googlegroups.com
I thnik also that views and perspecive cannot be used in a java applictaion using SWT widgets, they are not SWT widgets but eclipse RCP widgets.

Ganesh Kumbhar

unread,
Feb 18, 2015, 2:22:18 PM2/18/15
to robotframework-ec...@googlegroups.com
Hi Laurent,

1) Following are my keywords list I ran, but for all find keywords got "NoSuchMethodException" as told you already, So I am not getting what's the problem as some keywords from same Eclipse Library are working & some are not

   Set Eclipse Library Log Level  DEBUG
   Start Application In Separate Thread  fr.valtech.mc.SWTSample
   Start SWTBotBridge 
   Run Keyword And Continue On Failure  Find Perspective By Label  CATCH
   Run Keyword And Continue On Failure  Activate Perspective
   Run Keyword And Continue On Failure  Find View By Title  Project Explorer
   Run Keyword And Continue On Failure  Find Tree With Label  VCIntegrationTests
   Run Keyword And Continue On Failure  Get Tree Item Cell  5  15
   Run Keyword And Continue On Failure  Check Tree Item
   Run Keyword And Continue On Failure  Set Capture Screenshot On Error  error.jpg
   Run Keyword And Continue On Failure  Find Active View          
   Run Keyword And Continue On Failure  Get View Title
   Run Keyword And Continue On Failure  Find Active Perspective
   Run Keyword And Continue On Failure  Get Perspective Label 
   Run Keyword And Continue On Failure  List All Perspectives
   Run Keyword And Continue On Failure  Find Eclipse Editor By Label  ProcessingKeywords.txt
   Get Eclipse Editor Text On Current Line


2) As you told views and perspective are not eclipse RCP widgets, but even for " Find Eclipse Editor By Label" keyword I am getting same error i.e. "NoSuchMethodException"  which i am getting for views & perspectives also.

Error for "Find Eclipse Editor By Label" : java.lang.NoSuchMethodException: org.eclipse.swtbot.swt.finder.SWTBot.editorByTitle(java.lang.String)
And getting same error for find views & perspectives also.

3) And i need to use  views & perspectives also for my GUI testing because without this I don't think it's possible to test GUI, so what else i need to install to make this work.

Thank You,
Ganesh.
Reply all
Reply to author
Forward
0 new messages