1
我對我的python測試用例使用了selenium python webdriver。 我有我試圖從Ubuntu的終端上運行(類似命令提示窗口的東西)python腳本NowSpots_Traffic.py在爲Python運行selenium webdriver時傳遞參數
蟒蛇/home/vijay/Projects/SeleniumScripts/NowSpots_Traffic.py塞繆爾分泌
其中薩穆埃爾和分泌兩種說法,我需要傳遞給我python腳本NowSpots_Traffic.py
我也跟着在Running Tests in Python with Selenium 2 and WebDriver 節「多瀏覽器和多平臺」中的說明。
,但我得到了以下錯誤消息
Traceback (most recent call last):
File "/home/vijay/Projects/SeleniumScripts/NowSpots_Traffic.py", line 43, in <module>
unittest.main()
File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
self.parseArgs(argv)
File "/usr/lib/python2.7/unittest/main.py", line 152, in parseArgs
self.createTests()
File "/usr/lib/python2.7/unittest/main.py", line 161, in createTests
self.module)
File "/usr/lib/python2.7/unittest/loader.py", line 128, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'samuel'