예제 #1
0
        public SubmittedBankForm Submit(string licensee, string brand, string bankName)
        {
            SelectLicenseeBrand(
                By.XPath("//select[contains(@data-bind, 'options: Model.licensees')]"),
                By.XPath("//select[contains(@data-bind, 'options: Model.licensees')]"),
                licensee,
                By.XPath("//select[contains(@data-bind, 'options: Model.brands')]"),
                brand);

            var bankNameField = _driver.FindElementWait(By.XPath("//input[contains(@data-bind, 'value: Model.bankName')]"));

            bankNameField.Clear();
            bankNameField.SendKeys(bankName);

            var remarksField = _driver.FindElementWait(By.XPath("//textarea[contains(@data-bind, 'value: Model.remarks')]"));

            remarksField.Clear();
            remarksField.SendKeys("new bank");

            var saveButton = _driver.FindElementWait(By.XPath("//button[text()='Save']"));

            saveButton.Click();

            var form = new SubmittedBankForm(_driver);

            return(form);
        }
예제 #2
0
        public SubmittedBankForm SubmitWithLicensee(string licensee, string brand, string bankId, string bankName, string countryName, string remarks)
        {
            SelectLicenseeBrand(
                By.XPath("//select[contains(@data-bind, 'options: Model.licensees')]"),
                By.XPath("//select[contains(@data-bind, 'options: Model.licensees')]"),
                licensee,
                By.XPath("//select[contains(@data-bind, 'options: Model.brands')]"),
                brand);

            var bankIdField = _driver.FindElementWait(By.XPath("//input[contains(@data-bind, 'value: Model.bankId')]"));

            bankIdField.SendKeys(bankId);

            var bankNameField = _driver.FindElementWait(By.XPath("//input[contains(@data-bind, 'value: Model.bankName')]"));

            bankNameField.SendKeys(bankName);

            SelectCountry(countryName);

            var remarksField = _driver.FindElementWait(By.XPath("//textarea[contains(@data-bind, 'value: Model.remarks')]"));

            remarksField.SendKeys("new bank");

            ClickSaveButton();

            var form = new SubmittedBankForm(_driver);

            return(form);
        }
예제 #3
0
        public SubmittedBankForm OpenViewBankForm(string bankName)
        {
            Grid.SelectRecord(bankName);
            var viewBankButton = FindActionButton("view", GridXPath);

            viewBankButton.Click();
            var viewBankForm = new SubmittedBankForm(_driver);

            return(viewBankForm);
        }