public void AddOrder(String ccode, String cname, String pname, String qty) { //Select Customer SearchCustomer.Click(); Thread.Sleep(3000); SearchCode.SendKeys(ccode); SearchName.SendKeys(cname); RunSearch.Click(); Thread.Sleep(3000); SelectCustomer.Click(); Thread.Sleep(5000); //Select Product SearchProduct.Click(); Thread.Sleep(3000); SearchPName.SendKeys(pname); RunPSearch.Click(); Thread.Sleep(3000); SelectProduct.Click(); Thread.Sleep(3000); //Finish the follow flow AddQty.SendKeys(qty); AddBtn.Click(); Thread.Sleep(3000); CompleteBtn.Click(); }
private void btnSearchCustomer_Click(object sender, RoutedEventArgs e) { SelectCustomer viewSelect = new SelectCustomer(); if (viewSelect.ShowDialog() == true) { this.facturaSeleccionada.Customer = viewSelect.CustomerSelect; } }
/// <summary> /// Call this method to search for a Buyer Catalog providing the profile name and identity /// </summary> /// <param name="profileName">Customer/Profile name</param> public void SearchForBuyerCatalog(string profileName) { if (!SelectCustomer.SelectedOption.Text.Equals(profileName)) { SelectCustomer.SelectByText(profileName); } ////SearchCatalogLink.Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", SearchCatalogLink); webDriver.WaitForPageLoad(new TimeSpan(0, 0, 10)); }
public void SelectCustomers() { SelectCustomer selectCustomer = new SelectCustomer(); var customer = selectCustomer.GetustomerByFirstName("Mayuresh"); }
public string GenerateCatalog( Workflow workflow, string profileName, string identityName, string validityEnd, string emailAddress, string configurationType) { SelectCustomer.SelectByText(profileName); webDriver.WaitForElementDisplayed( By.XPath("//select[@id='ContentPageHolder_drp_CBC_Identity']/option[text()='" + identityName + "']"), TimeSpan.FromSeconds(10)); IdentityName.SelectByText(identityName); System.Threading.Thread.Sleep(10000); ValidityEnd.SendKeys(validityEnd); EmailAddress.SendKeys(emailAddress); if (workflow == Workflow.Eudc) { if (!string.IsNullOrEmpty(configurationType)) { Console.WriteLine("Configuration Type not provided"); } ClearConfigurationTypes(); if (configurationType.Equals("Standard Configurations")) { ////ConfigurationTypes.ElementAt(0).Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(0)); } else if (configurationType.Equals("SNP")) { ////ConfigurationTypes.ElementAt(2).Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(2)); } } if (workflow == Workflow.Asn) { if (!ConfigurationTypes.ElementAt(0).Selected) { ////ConfigurationTypes.ElementAt(0).Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(0)); } if (!ConfigurationTypes.ElementAt(7).Selected) { ////ConfigurationTypes.ElementAt(7).Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(7)); } if (!ConfigurationTypes.ElementAt(2).Selected) { ////ConfigurationTypes.ElementAt(2).Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(2)); } if (!ConfigurationTypes.ElementAt(3).Selected) { ////ConfigurationTypes.ElementAt(3).Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(3)); } if (!ConfigurationTypes.ElementAt(6).Selected) { ////ConfigurationTypes.ElementAt(6).Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", ConfigurationTypes.ElementAt(6)); } } ////GenerateCatalogLink.Click(); javaScriptExecutor.ExecuteScript("arguments[0].click();", GenerateCatalogLink); webDriver.WaitForElementDisplayed(By.Id("ContentPageHolder_lbl_TY_ThreadId"), new TimeSpan(0, 0, 10)); return(ThreadId.Text); }