예제 #1
0
        public SubmittedTransferSettingsForm Submit(TransferSettingsData data)
        {
            SelectLicenseeBrand(By.XPath("//label[contains(@for, 'transfer-settings-licensee')]"),
                                By.XPath("//select[contains(@id, 'transfer-settings-licensee')]"), data.Licensee, By.XPath("//select[contains(@id, 'transfer-settings-brand')]"), data.Brand);
            var currency = new SelectElement(_currencyField);

            currency.SelectByText(data.Currency);
            var transferFundType = new SelectElement(_transferTypeField);

            transferFundType.SelectByText(data.TransferFundType);
            if (data.VipLevel != null)
            {
                var vipLevel = new SelectElement(_vipLevel);
                vipLevel.SelectByText(data.VipLevel);
            }
            if (data.ProductWallet != null)
            {
                var productWallet = new SelectElement(_productWallet);
                productWallet.SelectByText(data.ProductWallet);
            }
            _minAmountPerTransaction.Clear();
            _minAmountPerTransaction.SendKeys(data.MinAmountPerTransaction);
            _maxAmountPerTransaction.Clear();
            _maxAmountPerTransaction.SendKeys(data.MaxAmountPerTransaction);
            _maxAmountPerDay.SendKeys(data.MaxAmountPerDay);
            _maxTransactionPerDay.SendKeys(data.MaxTransactionsPerDay);
            _maxTransactionPerWeek.SendKeys(data.MaxTransactionsPerWeek);
            _maxTransactionPerMonth.SendKeys(data.MaxTransactionsPerMonth);
            _driver.ScrollPage(0, 600);
            _saveButton.Click();
            var submittedForm = new SubmittedTransferSettingsForm(_driver);

            return(submittedForm);
        }
        public SubmittedTransferSettingsForm Submit(TransferSettingsData data)
        {
            //_clearButton.Click();
            _minAmountPerTransaction.Clear();
            _minAmountPerTransaction.SendKeys(data.MinAmountPerTransaction);
            _maxAmountPerTransaction.Clear();

            _maxAmountPerTransaction.SendKeys(data.MaxAmountPerTransaction);
            _maxAmountPerDay.Clear();

            _maxAmountPerDay.SendKeys(data.MaxAmountPerDay);
            _maxTransactionPerDay.Clear();

            _maxTransactionPerDay.SendKeys(data.MaxTransactionsPerDay);
            _maxTransactionPerWeek.Clear();

            _maxTransactionPerWeek.SendKeys(data.MaxTransactionsPerWeek);
            _maxTransactionPerMonth.Clear();

            _maxTransactionPerMonth.SendKeys(data.MaxTransactionsPerMonth);
            _driver.ScrollPage(0, 600);
            _saveButton.Click();
            var submittedForm = new SubmittedTransferSettingsForm(_driver);

            return(submittedForm);
        }