MarketSquare / SwingLibrary

Swing UI testing library for Robot Framework
Other
113 stars 68 forks source link

Cannot run the JavaSwings library #89

Closed amolsjain closed 8 years ago

amolsjain commented 8 years ago

I was to execute Swings Demo using RIDE 1.5.2.1 running on Python 2.7.12. Below is the error that I am getting. I think I need to put the SwingLibrary.jar in the classpath but I am not sure where is the classpath that jybot refers. I am new to RF, please help.

Under Tool>Preference>Importing I have set the below :+1: Pythinpath : C:\Python27\Lib\SwingLibrary.jar;C:\ShepMod\softwares\robotframework\SwingLib Path to xml directory : C:\ShepMod\softwares\robotframework\SwingLib

Error : command: jybot.bat --argumentfile c:\users\userID\appdata\local\temp\RIDEsbqcom.d\argfile.txt --listener C:\Python27\lib\site-packages\robotide\contrib\testrunner\TestRunnerAgent.py:51122:False C:\Mod\softwares\robotframework\SwingLib\swinglibrary-demo\example.txt

Example

[ ERROR ] Error in file 'C:\Mod\softwares\robotframework\SwingLib\swinglibrary-demo\example.txt': Importing test library 'SwingLibrary' failed: ImportError: No module named SwingLibrary Traceback (most recent call last): None PYTHONPATH: C:\Mod\softwares\robotframework\SwingLib C:\Mod\softwares\robotframework\Framework\src C:\jython2.7.0\Lib classpath pyclasspath/ C:\jython2.7.0\Lib\site-packages CLASSPATH: C:\jython2.7.0\jython.jar . Test Add Todo Item | FAIL | Parent suite setup failed: No keyword with name 'Start Application' found. Did you mean: Start Test Application

Test Delete Todo Item | FAIL | Parent suite setup failed: No keyword with name 'Start Application' found. Did you mean: Start Test Application

Example | FAIL | Suite setup failed: No keyword with name 'Start Application' found. Did you mean: Start Test Application

2 critical tests, 0 passed, 2 failed 2 tests total, 0 passed, 2 failed

Output: c:\users\userID\appdata\local\temp\RIDEsbqcom.d\output.xml Log: c:\users\userID\appdata\local\temp\RIDEsbqcom.d\log.html Report: c:\users\userID\appdata\local\temp\RIDEsbqcom.d\report.html

test finished 20161109 08:21:01

badari412 commented 8 years ago

Open jybot.bat file present in "jython_installation_folder\bin\" (for e.g. C:\jython2.7.0\bin) and in any text editor and add the line "set CLASSPATH=_path_to_the_folder_containing_swinglibrary\swinglibrary-1.9.6.jar"..for e.g. set CLASSPATH=C:\libs\swinglibrary-1.9.6.jar.

amolsjain commented 8 years ago

Thanks that worked.