I am using selenium grid to execute tests. I am hooking grid using batch files. Is there any command to kill IEDriverServer.exe and clear %temp% folder, which I can use to execute before starting grid?

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

answered by
selected by
0 votes
Best answer

Try using below code while starting grid server.

@echo off
taskkill /f /im IEDriverServer.exe

set "var=%cd%"
cd %temp%
for /d %%D in (*) do rd /s /q "%%D"
del /f /q *

cd %var%
java -jar selenium-server.jar -role hub

Hope it helps