当我使用 jybot.bat 执行脚本时,我的测试失败了。另一方面,如果我使用 pybot.bat 测试运行良好。我不明白为什么会这样。如果有人看到此问题,请提供帮助。
C:\>jybot.bat "\Automation\robot_framework\ui_testing\unity_portal\unity_smoke_t
est\01_basic_admin_fuctionalities\01 - 10 - Customer Admin - 01 - User Managemen
t - Users - Add User.txt"
[ ERROR ] Error in file 'C:\Automation\robot_framework\ui_testing\unity_portal\l
ib\resources\resource.txt': Importing test library 'Selenium2Library' failed: Sy
ntaxError: future feature unicode_literals is not defined (selenium.py, line 17)
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\Selenium2Library\__init__.py", line 2, in
<module>
from keywords import *
File "C:\Python27\Lib\site-packages\Selenium2Library\keywords\__init__.py", li
ne 3, in <module>
from _browsermanagement import _BrowserManagementKeywords
File "C:\Python27\Lib\site-packages\Selenium2Library\keywords\_browsermanageme
nt.py", line 4, in <module>
from selenium import webdriver
File "C:\Python27\Lib\site-packages\selenium\__init__.py", line 16, in <module
>
from selenium import selenium
PYTHONPATH:
C:\Python27\Lib\site-packages\robot\libraries
C:\Python27\Lib\site-packages
C:\jython2.5.2\Lib__classpath____pyclasspath__/
C:\jython2.5.2\Lib\site-packages
C:\CLASSPATH:
C:\jython2.5.2\jython.jar
[ ERROR ] Error in file 'C:\Automation\robot_framework\ui_testing\unity_portal\l
ib\resources\resource_int.txt': Importing test library 'Selenium2Library' failed
: SyntaxError: future feature unicode_literals is not defined (selenium.py, line
17)
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\Selenium2Library\__init__.py", line 2, in
<module>
from keywords import *
File "C:\Python27\Lib\site-packages\Selenium2Library\keywords\__init__.py", line 3, in
<module>
from _browsermanagement import _BrowserManagementKeywordsFile
"C:\Python27\Lib\site-packages\Selenium2Library\keywords\_browsermanageme
nt.py", line 4, in <module>
from selenium import webdriver
File "C:\Python27\Lib\site-packages\selenium\__init__.py", line 16, in <module
>
from selenium import selenium
PYTHONPATH:
C:\Python27\Lib\site-packages\robot\libraries
C:\Python27\Lib\site-packages
C:\jython2.5.2\Lib
__classpath__
__pyclasspath__/
C:\jython2.5.2\Lib\site-packages
C:\CLASSPATH:
C:\jython2.5.2\jython.jar
==============================================================================
01 - 10 - Customer Admin - 01 - User Management - Users - Add User :: 01) U...
==============================================================================
10 - Customer Admin - 01 - User Management - Users - Add User | FAIL |
No keyword with name 'Set Selenium Timeout' found.
Also teardown failed:
No keyword with name 'Close All Browsers' found.
------------------------------------------------------------------------------
01 - 10 - Customer Admin - 01 - User Management - Users - Add User... | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output: C:\output.xml
Log: C:\log.html
Report: C:\report.html
C:\>