开发者

Visual Studio 2010 hangs when running Selenium as Pre-Build event

I have created a bat file which calls selenium server called run-selenium-server.bat which has:

java -jar D:\temp\selenium-server\selenium-server.jar

Also I have added in my project properties "Build Events" the pre-build event command line:

"$(SolutionDir)..\references\selenium-server\run-开发者_如何转开发selenium-server.bat"

The path is correct but when I build the project: Visual Studio 2010 just hangs and I have to open Process Explorer to kill java process.

I noticed Output window is showing the pre-build command output. Is there a way to run this bat file as a separate DOS process directly from Visual Studio?


You could try

call "$(SolutionDir)..\references\selenium-server\run-selenium-server.bat"

This is noted on this MSDN page. Also note that it's probably best to start the java.exe using the start command like so:

start java -jar D:\temp\selenium-server\selenium-server.jar
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜