我是Robot框架的新手。我使用的是来自swinglibrary-1.5.1.jar的示例GUI应用程序。
java -cp swinglibrary-1.5.1 org.robotframework.swing.testapp.examplesut.TodoListApplication
为此,我需要在PC中安装Swing库。 谁能帮助我逐步安装Swing库(包括需要在环境变量中设置的参数)。
在这里问之前,我尝试过:
pip install robotframework-swinglibrary
我的机器人脚本:
*** Settings ***
Library SeleniumLibrary
Library SwingLibrary
Library DateTime
Resource ../resources/common/common.robot
*** Keywords ***
*** Test Cases ***
main poc
[Tags] poc
Select Window Todo List
我的错误跟踪是:
$ robot --include 'poc' data
==============================================================================
Data
==============================================================================
[ ERROR ] Error in file 'C:\workspace\test\data\poc.robot': Importing test library 'SwingLibrary' failed: ModuleNotFoundError: No module named 'SwingLibrary'
Traceback (most recent call last):
None
PYTHONPATH:
C:\My Program Files\Python\Python37-32\Scripts\robot.exe
c:\my program files\python\python37-32\python37.zip
c:\my program files\python\python37-32\DLLs
c:\my program files\python\python37-32\lib
c:\my program files\python\python37-32
C:\Users\foo\AppData\Roaming\Python\Python37\site-packages
c:\my program files\python\python37-32\lib\site-packages
c:\my program files\python\python37-32\lib\site-packages\win32
c:\my program files\python\python37-32\lib\site-packages\win32\lib
c:\my program files\python\python37-32\lib\site-packages\Pythonwin