Esempio n. 1
0
 public void Transfer()
 {
     SetDriver();
     do
     {
         Driver.ChromeDriver.Navigate().GoToUrl(config.EskokAdress);
         homepage.LoginField.SendKeys(UserTransfer);
         homepage.NextButton.Click();
         Thread.Sleep(1000);
         homepage.PasswordField.SendKeys(ValidUserPassword);
         homepage.LoginButton.Click();
         Thread.Sleep(1000);
         header.OneTimeTransfer.Click();
         oneTimeTransfer.AmmountField.SendKeys("0.01");
         oneTimeTransfer.IBANField.SendKeys(IBAN);
         oneTimeTransfer.Odbioca.SendKeys("test");
         oneTimeTransfer.Szczegoly.SendKeys("Testowe szczegoly");
         oneTimeTransfer.NextButton.Click();
         OneTimeTransferOverview.NextButton.Click();
         Thread.Sleep(2000);
         string SMS = autentyfication.GetSmsPassword().ToString();
         OneTimeTransferAkcept.PasswordImput.SendKeys(SMS);
         OneTimeTransferAkcept.AkceptButton.Click();
     } while (status == 2);
 }
Esempio n. 2
0
        public void ValidTransfer()
        {
            Driver.ChromeDriver = new ChromeDriver();
            Driver.ChromeDriver.Manage().Cookies.DeleteAllCookies();
            Config                  config = new Config();
            Header                  header = new Header();
            Autentyfication         autentyfication = new Autentyfication();
            Homepage                homepage = new Homepage();
            MainPage                mainpage = new MainPage();
            Action                  action = new Action();
            Actions                 actions = new Actions(Driver.ChromeDriver);
            TransferLimit           transferLimit = new TransferLimit();
            Menu                    menu = new Menu();
            OneTimeTransfer         oneTimeTransfer = new OneTimeTransfer();
            OneTimeTransferOverview oneTimeTransferOverview = new OneTimeTransferOverview();
            OneTimeTransferAkcept   oneTimeTransferAkcept = new OneTimeTransferAkcept();
            string                  TransferMoney, IBAN, SMS;

            Driver.ChromeDriver.Manage().Window.Maximize();
            Driver.ChromeDriver.Navigate().GoToUrl(config.EskokAdress);
            LoginUser = autentyfication.ValidUserLoginSelect();
            homepage.LoginField.SendKeys(LoginUser);
            homepage.NextButton.Click();
            Thread.Sleep(1000);
            homepage.PasswordField.SendKeys(ValidUserPassword);
            homepage.LoginButton.Click();
            try
            {
                if (homepage.FirstAlertButton.Displayed)
                {
                    homepage.FirstAlertButton.Click();
                }
            }
            catch (NoSuchElementException)
            {
            }
            //header.Settings.Click();
            DayLimitTransfer   = transferLimit.ChangeDayLimit.Text;
            MonthLimitTransfer = transferLimit.ChangeMonthLimit.Text;
            menu.Transfer.Click();
            AnavableMoney = oneTimeTransfer.AnavableMoney.Text;
            TransferMoney = action.GetValidTrasferAmmount(AnavableMoney, DayLimitTransfer, MonthLimitTransfer);
            oneTimeTransfer.AmmountField.SendKeys(TransferMoney);
            IBAN = action.GetValidIBANNumber();
            oneTimeTransfer.IBANField.SendKeys(IBAN);
            Thread.Sleep(1000);
            oneTimeTransfer.Odbioca.SendKeys("Test");
            oneTimeTransfer.Szczegoly.SendKeys("Test");
            actions.MoveToElement(oneTimeTransfer.NextButton);
            oneTimeTransfer.NextButton.Click();
            Thread.Sleep(2000);
            oneTimeTransferOverview.NextButton.Click();
            Thread.Sleep(5000);
            SMS = autentyfication.GetSmsPassword();
            oneTimeTransferAkcept.PasswordImput.SendKeys(SMS);
            Thread.Sleep(3000);
            oneTimeTransferAkcept.AkceptButton.Click();
            Thread.Sleep(3000);
            Driver.ChromeDriver.Quit();
        }