开发者

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

开发者 https://www.devze.com 2023-03-04 20:40 出处:网络
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

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

精彩评论

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

关注公众号