私のシステムでは、Python 2.6 と Robot フレームワークがありました。以下のリンクの指示に従って Selenium2Library をインストールし まし た。
ERROR: clean-python26-env]$ python testExeJS.py
======================================================================
ERROR: test_exe_javascript (__main__.ExecuteJavascriptTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "testExeJS.py", line 7, in setUp
selenium.setTimeout("60000")
NameError: global name 'selenium' is not defined
----------------------------------------------------------------------
Ran 1 test in 0.000s
FAILED (errors=1)
どんな助けも本当に感謝しています
編集
申し訳ありませんが、あなたの返信を見ました。これは、私の問題をより理解するのに役立つかもしれません。サンプル コード リンクは次のとおりです。
私の実行中のエラーは次のとおりです。
$ pybot myFirstTest.txt
==============================================================================
myFirstTest :: This is your first test
==============================================================================
[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: No browser is open
Go To Google Page [Documentation] Go to google page and search som... | FAIL |
WebDriverException: Message: 'The browser appears to have exited before we could connect. The output was: Error: no display specified\n'
------------------------------------------------------------------------------
[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: No browser is open
Open Selenium Page [Documentation] TestCase for open Selenium page | FAIL |
No browser is open
------------------------------------------------------------------------------
myFirstTest :: This is your first test | FAIL |
2 critical tests, 0 passed, 2 failed
2 tests total, 0 passed, 2 failed
==============================================================================
Output: /data/home/sadikhan/ironport/Selenium/output.xml
Log: /data/home/sadikhan/ironport/Selenium/log.html
Report: /data/home/sadikhan/ironport/Selenium/report.html