RemoteSwingLIbrary RobotFramework

[亡魂溺海] 提交于 2021-02-20 02:43:27

问题


I downloaded the jar file from here and put it in PYTHONPATH.

Executed the test

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

Getting the below error:

    [ 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

回答1:


Followed the link provided by you. I just have, reproduced the issue mentioned by you as you see below:

Then you need to set the PYTHONPATH to include the remote swing library as mentioned there in the link. You may notice in the screen shot that there is no remote swing library found in the PYTHONPATH.

Used below command to set on the command prompt:

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.

Now again the run the test, pybot test.txt and do not see the mentioned error any more.



来源:https://stackoverflow.com/questions/34954387/remoteswinglibrary-robotframework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!