2016-01-22 88 views
0

我从here下载了jar文件,并将其放入PYTHONPATHRemoteSwingLIbrary RobotFramework

执行测试

C:\Users\panda18\Desktop\Free_software\jsoftphone\jsoftphone>pybot test.txt

获取以下错误:

[ ERROR ] Error in  file 'C:\Users\xxxx\Desktop\Free_software\xxxx\test.txt': Importing test  library 'RemoteSwingLibrary' failed: ImportError: No mod 
    Traceback (most recent call last): 
     None 
    PYTHONPATH: 
    C:\Users\xxx\Desktop\RTS\CONF_FILE 
    C:\windows\system32\python27.zip 
    C:\Python27\DLLs 
    C:\Python27\lib 
    C:\Python27\lib\plat-win 
    C:\Python27\lib\lib-tk 
    C:\Python27 
    C:\Python27\lib\site-packages 
    C:\Python27\lib\site-packages\PIL 

    C:\Python27\lib\site-packages\win32 
    C:\Python27\lib\site-packages\win32\lib 
    C:\Python27\lib\site-packages\Pythonwin 
+0

你能展示测试来重现问题吗? – Rao

回答

1

跟着你提供的链接。我只是,转载由你提到的问题,因为你看到如下:

enter image description here

然后,你需要设置PYTHONPATH包括为链接提到那里的远程Swing库。您可能会注意到在屏幕截图中有没有在PYTHONPATH中找到的远程摇摆库。

使用以下命令在命令提示符下设置:

 
set PYTHONPATH=%PYTHONPATH%;C:\Users\apps\Downloads\remoteswinglibrary-2.0.3.jar 

Note: You may replace the path in the above command as per your environment. And of course, you may also set PATHONPATH in environment variables of your system as well if you do not want to set the each time in command window.

现在再次运行测试,pybot test.txt并没有看到提到的错误了。