I am using selenium webdriver to navigate to website and send keys. It is working fine in development environment/computer. But I am getting error, when im trying to run through different computer.
namespace McaidWebToolImport
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter the batch number: ");
string batchnumber = Console.ReadLine();
if (batchnumber != "")
{
IWebDriver driver1 = new InternetExplorerDriver(@"C:\IEDriverServer\");
driver1.Navigate().GoToUrl("http://website.com/webtool/physPop.asp?b=" + batchnumber);
System.Threading.Thread.Sleep(2000);
driver1.Quit();
}
else
{
Console.WriteLine("Re-run the application with valid batch number");
Console.WriteLine("\n\nPress Esacpe key (Esc) to exit");
while (Console.ReadKey(true).Key != ConsoleKey.Escape);
}
}
}
}