public CommunicationsResponse RetrieveSelectedBankAccountDetails(BankCommsCapsule capsule) { string address = "https://online.mbank.pl/pl/Login"; CommunicationsResponse response = new CommunicationsResponse(); ChromeDriver driver = new ChromeDriver(); driver.Navigate().GoToUrl(address); // WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); Thread.Sleep(3000); IWebElement login = driver.FindElementByName("userID"); IWebElement password = driver.FindElementByName("pass"); login.SendKeys(capsule._login); password.SendKeys(capsule._password); password.Submit(); driver.Navigate().GoToUrl("https://online.mbank.pl/pl#/accounts"); Thread.Sleep(3000); // IWebElement account = driver.FindElementByName driver.Quit(); return(response); }
public BankAccountDetails GiveAccountDetails(SingleAccountInfo info) { AccountInfoRequestFactory factory = new AccountInfoRequestFactory(); BankCommsCapsule capsule = factory.CreateBankCommunicationsCapsule(info); CommunicationsResponse resp = _selectedComms.RetrieveSelectedBankAccountDetails(capsule);//the part where magic happens AccountInfoResponseParser parser = new AccountInfoResponseParser(); BankAccountDetails details = parser.FormAccountDetails(resp); return(details); }
internal BankAccountDetails FormAccountDetails(CommunicationsResponse resp) { throw new NotImplementedException(); }
public CommunicationsResponse RetrieveSelectedBankAccountDetails(BankCommsCapsule capsule) { string address = "https://online.mbank.pl/pl/Login"; CommunicationsResponse response = new CommunicationsResponse(); ChromeDriver driver = new ChromeDriver(); driver.Navigate().GoToUrl(address); // WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); Thread.Sleep(3000); IWebElement login = driver.FindElementByName("userID"); IWebElement password = driver.FindElementByName("pass"); login.SendKeys(capsule._login); password.SendKeys(capsule._password); password.Submit(); driver.Navigate().GoToUrl("https://online.mbank.pl/pl#/accounts"); Thread.Sleep(3000); // IWebElement account = driver.FindElementByName driver.Quit(); return response; }