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(); }
public void ClickOnAddInvoiceButton() { WebElementFunctions.WaitForElementAppears(_webDriver, addButton); _webDriver.FindElement(addButton).Click(); }
public void ClickInvoiceTab() { WebElementFunctions.WaitForElementAppears(_webDriver, invoiceTab); _webDriver.FindElement(invoiceTab).Click(); }
public void SendNextButton() { WebElementFunctions.WaitForElementAppears(_webDriver, nextButton); _webDriver.FindElement(nextButton).Click(); }
public void SendUserName(string userName) { WebElementFunctions.WaitForElementAppears(_webDriver, userNameInput); _webDriver.FindElement(userNameInput).SendKeys(userName); }