I'm trying to set a remote PC as a Selenium node, using a console app that will run on the hub/server PC.
When the program's run in debug mode, I get the following text in 'errorMessage'
The handle is invalid.
Connecting to 200.200.20.200:5555...
Couldn't access 200.200.20.200:5555
Connecting to 200.200.20.200:5555...
The server has PsExec at : D:\PSTools\PsExec.exe
Server IP : 100.100.10.100
Remote IP : 200.200.20.200
The jar file in remote PC is saved at : D:\Selenium\selenium-server-standalone.jar
The command to be run in remote pc is
D:\Selenium>java -jar selenium-server-standalone.jar -role node -hub http://100.100.10.100/grid/register
what am i missing here
private static void StartSeleniumNode()
{
Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.FileName = @"D:\PSTools\PsExec.exe";
p.StartInfo.Arguments = @"\\200.200.20.200:5555 -u xyz -p abc123 -i -w D:\Selenium java -jar selenium-server-standalone.jar -role node -hub http://100.100.10.100:4444/grid/register";
p.Start();
string output = p.StandardOutput.ReadToEnd();
string errormessage = p.StandardError.ReadToEnd();
p.WaitForExit();
}