I made a login automation application with C# + .NET - MVC.
My application works perfectly on my local computer and saves everything on the database.
Once I deployed my application on our local machine, the Index View receives the email and password, sends them to the database and saves them. The next step firing up a WebDriver (Firefox or Chrome worked on laptop) with Selenium. Here, nothing happens. It keeps waiting on the localhost forever and both Chrome and FF timeout after a certain period of time.
[HttpGet]
public ActionResult Index()
{
return View();
}
[HttpPost]
public ActionResult getInformation()
{
email = Request["getEmail"].ToString();
password = Request["getPassword"].ToString();
saveLogin();
return RedirectToAction("gatherer");
}
public ActionResult gatherer()
{
facebookLogin();
return null;
}
private static void facebookLogin()
{
chrome = new FirefoxDriver();
chrome.Navigate().GoToUrl("http://facebook.com");
chrome.FindElement(By.Id("email")).SendKeys(email);
chrome.FindElement(By.Id("pass")).SendKeys(password);
chrome.FindElement(By.Id("loginbutton")).Click();
}
This is very simple and it worked on my local computer again. But deployed on IIS on the server, it doesn't. In other words : the webdriver never opens.