Started adding login logic for Lloyds

This commit is contained in:
Aaron Yarborough 2017-01-25 17:05:17 +00:00
parent 32d5624c7a
commit 6a571ea495

View file

@ -11,7 +11,7 @@ namespace BankingBot.LoginManagers
{
//private LloydsLoginCredentials _credentials;
private readonly IBrowserBot _browserBot;
public LloydsLoginManager(IBrowserBot browserBot)
{
_browserBot = browserBot;
@ -19,8 +19,15 @@ namespace BankingBot.LoginManagers
public void Login(ILoginCredentials credentials)
{
var lloydsCreds = (LloydsLoginCredentials)credentials;
_browserBot.WebDriver.Url = "https://online.lloydsbank.co.uk/personal/logon/login.jsp";
_browserBot.WebDriver.Navigate();
_browserBot.WebDriver.FindElement(By.Id("frmLogin:strCustomerLogin_userID")).SendKeys(lloydsCreds.Username);
_browserBot.WebDriver.FindElement(By.Id("frmLogin:strCustomerLogin_pwd")).SendKeys(lloydsCreds.Password);
_browserBot.WebDriver.FindElement(By.Id("frmLogin:btnLogin2")).Click();
}
}
}