예제 #1
0
    //Check should be pplaced to see if the user has enough credit for transaction, if they do not they should be notified  they don't have funds in account
    public static void aftermoney()
    {
        var Page2 = new easyeftthc.PaymentConfirmOTP();

        if (LibraryUtils.IsElementPresent(By.XPath("//span[text() = 'The amount exceeds your available balance']")))
        {
            LibraryUtils.driver.Quit();
        }
        else
        {
            LibraryUtils.conPay();
            Page2.Show();
        }
    }
예제 #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            string otp   = logOTP.Password;
            var    Page2 = new PaymentConfirmOTP();

            LibraryUtils.loginOTP(otp);

            if (LibraryUtils.IsElementPresent(By.XPath("//span[text() = 'PAY']")))
            {
                LibraryUtils.conBen(EnterCredentials.rec);
                LibraryUtils.money();
            }

            if (LibraryUtils.IsElementPresent(By.XPath("//span[text() = 'The amount exceeds your available balance']")))
            {
                LibraryUtils.driver.Quit();
            }
            else
            {
                LibraryUtils.conPay();
                Page2.Show();
                this.Close();
            }
        }