Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将SwingLibrary插件添加到RobotFramework?_Swing_Jython_Robotframework - Fatal编程技术网

如何将SwingLibrary插件添加到RobotFramework?

如何将SwingLibrary插件添加到RobotFramework?,swing,jython,robotframework,Swing,Jython,Robotframework,我正在尝试执行中提供的SwingLibrary演示 设置完所有内容(Jython、RobotFramework、演示应用程序)后,我可以运行以下命令: run_demo.py startapp ,它可以工作(演示应用程序启动) 现在,如果我尝试运行示例测试,它将失败: run_demo.py example.txt [ ERROR ] Error in file '/home/user1/python-scripts/gui_automation/sample-text.txt': Non-

我正在尝试执行中提供的SwingLibrary演示

设置完所有内容(Jython、RobotFramework、演示应用程序)后,我可以运行以下命令:

run_demo.py startapp
,它可以工作(演示应用程序启动)

现在,如果我尝试运行示例测试,它将失败:

run_demo.py example.txt

[ ERROR ] Error in file '/home/user1/python-scripts/gui_automation/sample-text.txt': Non-existing setting 'Library SwingLibrary'.
[ ERROR ] Error in file '/home/user1/python-scripts/gui_automation/sample-text.txt': Non-existing setting 'Suite Setup Start Test Application'.
==============================================================================
Sample-Text                                                                   
==============================================================================
Test Add Todo Item                                                    | FAIL |
No keyword with name 'Insert Into Text Field description ${arg}' found.
------------------------------------------------------------------------------
Test Delete Todo Item                                                 | FAIL |
No keyword with name 'Insert Into Text Field description ${arg}' found.
------------------------------------------------------------------------------
Sample-Text                                                           | FAIL |
2 critical tests, 0 passed, 2 failed
2 tests total, 0 passed, 2 failed
==============================================================================
Output:  /home/user1/python-scripts/gui_automation/results/output.xml
Log:     /home/user1/python-scripts/gui_automation/results/log.html
Report:  /home/user1/python-scripts/gui_automation/results/report.html
我怀疑它找不到
swinglibrary.jar
,因此我的插件安装可能会出错


有什么想法吗?

看看报告中的这些错误消息:

[ ERROR ] Error in file '...': Non-existing setting 'Library SwingLibrary'.
[ ERROR ] Error in file '...': Non-existing setting 'Suite Setup Start Test Application'.
调试的第一条规则是始终假定错误消息告诉您的是事实真相

他们告诉你,你有一个未知的设置。它认为您正在使用一个名为“Library SwingLibrary”的设置和一个名为“Suite Setup Start Test”的设置。这些显然是不正确的设置名称。问题是,它为什么这么说

我猜您使用的是空格分隔的文本格式,在“Library”和“SwingLibrary”之间只有一个空格。因为只有一个空格,robot认为整行都在设置表的第一列中,第一列中的任何内容都被视为设置名称

修复应该简单到在“Library”之后插入两个或多个空格,在“suitesetup”之后插入两个或多个空格

这种类型的错误是我始终建议使用管道分隔格式的原因。它使细胞之间的边界更容易看到