我在Visual Studio Code(OS X)中创建了ASP .Net控制台项目。
然后在project.json中添加了依赖项:
"dependencies": {
"selenium-webdriver": "2.52.0"
},
运行“dnu restore”并收到错误:
Microsoft .NET开发实用程序CoreClr-x64-1.0.0-rc1-16231
CACHE api.nuget.org/v3/index.json恢复包 /Users/user/Code/ConsoleApplication/project.json
获取api.nuget.org/v3-flatcontainer/selenium-webdriver/index.json
NotFound api.nuget.org/v3-flatcontainer/selenium-webdriver/index.json 2432ms
无法找到Dependency selenium-webdriver> = 2.52.0 写锁文件 /Users/user/Code/ConsoleApplication/project.lock.json恢复 完成,3027ms过去了
/Users/user/Code/ConsoleApplication/project.json中的错误 无法找到Dependency selenium-webdriver> = 2.52.0
答案 0 :(得分:0)
所以,答案很简单 - 拼写错误。 ID为def result(request):
if 'q' in request.GET:
color = request.GET['q']
return render(request, 'result.html', {'color': color})
,而不是selenium.webdriver