-2

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:\>
4

1 に答える 1

0

Selenium2Library は jython では機能しません。Selenium2library Java ポートを試す必要があります

于 2013-09-05T08:02:52.270 に答える