macOSselenium3.4python3sublimetext3web开发测试驱动方法第四页第一个功能测试functional_tests.pyfromseleniumimportwebdriverbrowser=webdriver.Firefox()browser.get('http://localhost:8000')assert'Django'inbrowser.title报错Traceback(mostrecentcalllast):File"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/common/service.py",line74,instartstdout=self.log_file,stderr=self.log_file)File"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py",line707,ininitrestore_signals,start_new_session)File"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py",line1333,in_execute_childraisechild_exception_type(errno_num,err_msg)FileNotFoundError:[Errno2]Nosuchfileordirectory:'geckodriver'Duringhandlingoftheaboveexception,anotherexceptionoccurred:Traceback(mostrecentcalllast):File"/Users/Frankyan360/Documents/web_test/functional_tests.py",line3,in browser=webdriver.Firefox()File"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py",line142,ininitself.service.start()File"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/common/service.py",line81,instartos.path.basename(self.path),self.start_error_message)selenium.common.exceptions.WebDriverException:Message:'geckodriver'executableneedstobeinPATH.[Finishedin0.2swithexitcode1][cmd:['/usr/local/bin/python3','-u','/Users/Frankyan360/Documents/web_test/functional_tests.py']][dir:/Users/Frankyan360/Documents/web_test][path:/usr/bin:/bin:/usr/sbin:/sbin]不知道哪里出问题了
慕森卡
神不在的星期二
相关分类