There are 2 PCs(server & node). The Selenium hub is up & running. The notifications are seen in its cmd window. Now, I'm trying to set up another PC as a Selenium node. To do that I need to run 2 commands from the server PC command prompt.It works when done manually.Failing to do so programatically.
Here is what I have so far.
private static void StartSeleniumNode()
{
string Command1 = "/C cmdkey.exe /add:ABCDES181 /user:abc /pass:abc@123 & ";
string Command2 = "psexec.exe \\ABCDES181 -i -w D:\\Selenium java -jar selenium-server-standalone-2.47.1.jar -role node -hub http://someip:4444/grid/register";
Process.Start(cmd.exe, Command1 + Command2);
}
When run, a cmd window just pops up and closes. There would be a notification if a node is registered, but nothing of that sort here. I think it is the syntax to run 2 commands that is the issue here.