예제 #1
0
        public void CreateNewInvoiceTwoRate(Invoice invoice)
        {
            var invoiceNumberElement = _webDriver.FindElement(invoiceNumber);

            invoiceNumberElement.SendKeys(invoice.Number);

            // Invoice Date
            //WebDriverWait waitForElement = new WebDriverWait(_webDriver, TimeSpan.FromSeconds(10));
            //waitForElement.Until(ExpectedConditions.ElementIsVisible(invoiceDate));
            WebElementFunctions.WaitForElementAppears(_webDriver, invoiceDate);
            var datepickerModal = _webDriver.FindElement(invoiceDate);

            datepickerModal.Click();
            DatePicker datePicker = new DatePicker();

            datePicker.SelectectDate(invoice, _webDriver);

            WebDriverWait waitForElement = new WebDriverWait(_webDriver, TimeSpan.FromSeconds(10));

            // Invoice month
            //waitForElement.Until(ExpectedConditions.ElementIsVisible(billingMonth));
            WebElementFunctions.WaitForElementAppears(_webDriver, billingMonth);
            var monthpickerModal = _webDriver.FindElement(billingMonth);

            monthpickerModal.Click();
            datePicker.SelectMonth(invoice, _webDriver);

            waitForElement = new WebDriverWait(_webDriver, TimeSpan.FromSeconds(10));
            //waitForElement.Until(ExpectedConditions.ElementExists(jiraTimeLoggedRawUS));

            WebElementFunctions.WaitForElementAppears(_webDriver, jiraTimeLoggedRawUS);
            var timeLoggedRawUS = _webDriver.FindElement(jiraTimeLoggedRawUS);
            var s1 = timeLoggedRawUS.GetProperty("value");

            waitForElement = new WebDriverWait(_webDriver, TimeSpan.FromSeconds(10));
            //waitForElement.Until(ExpectedConditions.ElementExists(jiraTimeLoggedRawVN));
            WebElementFunctions.WaitForElementAppears(_webDriver, jiraTimeLoggedRawVN);
            var timeLoggedRawVN = _webDriver.FindElement(jiraTimeLoggedRawVN);
            var s2 = timeLoggedRawVN.GetProperty("value");

            InvoiceNumber = invoiceNumberElement.GetProperty("value");

            var createButtonElement = _webDriver.FindElement(createButton);

            createButtonElement.Click();
        }
예제 #2
0
 public void ClickOnAddInvoiceButton()
 {
     WebElementFunctions.WaitForElementAppears(_webDriver, addButton);
     _webDriver.FindElement(addButton).Click();
 }
예제 #3
0
 public void ClickInvoiceTab()
 {
     WebElementFunctions.WaitForElementAppears(_webDriver, invoiceTab);
     _webDriver.FindElement(invoiceTab).Click();
 }
예제 #4
0
 public void SendNextButton()
 {
     WebElementFunctions.WaitForElementAppears(_webDriver, nextButton);
     _webDriver.FindElement(nextButton).Click();
 }
예제 #5
0
 public void SendUserName(string userName)
 {
     WebElementFunctions.WaitForElementAppears(_webDriver, userNameInput);
     _webDriver.FindElement(userNameInput).SendKeys(userName);
 }