I wrote a code that start Appium server and after I start some automation. This is the Appium Launch code: (in C#)
using System.Diagnostics;
System.Diagnostics.Process process;
process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized; //Change to Hidden after debug
startInfo.FileName = AppiumNodePath;
startInfo.Arguments = AppiumJSPath + " --address " + AppiumServerIP + " --port " + currentAppiumPort + " --automation-name Appium --log-no-color --session-override --log C:\\test\\AppiumLog.txt";
process.StartInfo = startInfo;
process.Start();
I want to wait for Appium Server to be ready and only then to start the automation, Because if you start creating driver before I get an exception that Appium port is busy/refused.
How can I check if Appium is up and ready?