} // ToOutput private void OutputMetaData(List <string> oRow) { oRow.Add(RegNumber); oRow.Add('"' + CompanyName + '"'); oRow.Add(IncorporationDate.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); oRow.Add(CompanyScore < 0 ? "" : CompanyScore.ToString()); oRow.Add(CustomerID.ToString()); } // OutputMetaData
// public string CreateCustomerDetails(string colconame, int i, string lineofbusiness, string band) public string CreateCustomerDetails(string colconame, int i) { string customerERP = ""; string pth = AppDomain.CurrentDomain.BaseDirectory; Actions action = new Actions(DriverContext.GetDriver <IWebDriver>()); IReadOnlyCollection <string> all_windowHandles = DriverContext.GetDriver <IWebDriver>().WindowHandles; foreach (string handle in all_windowHandles) { DriverContext.GetDriver <IWebDriver>().SwitchTo().Window(handle); if (DriverContext.GetDriver <IWebDriver>().Title.Contains(colconame)) { string fileName = ConfigReader.TestDataFilepath; ExcelHelper eat = new ExcelHelper(fileName); string strWorksheetName = eat.getExcelSheetName(fileName, 1); BrowserHelper.BrowserMaximize(); action.MoveToElement(Start).Build().Perform(); action.MoveToElement(Customers).Build().Perform(); action.MoveToElement(CreatetopLevelCustomer).Click().Build().Perform(); ComboBoxHelper.SelectInDropDownByText(LineOfBusiness, eat.GetCellData(strWorksheetName, "LineOfBusiness", i)); ComboBoxHelper.SelectInDropDownByText(LineOfBusiness, lineofbusiness); string randomnumber = RandomNumberandStringGenerator.randomnumberwithoneargument(6); string fullname = "Automation" + randomnumber; TextBoxHelper.ClearandTypeinTextBox(FullName, fullname); TextBoxHelper.ClearandTypeinTextBox(ShortName, fullname); TextBoxHelper.ClearandTypeinTextBox(TradingName, fullname); ComboBoxHelper.SelectInDropDownByText(LegalEntity, eat.GetCellData(strWorksheetName, "LegalEntity", i)); TextBoxHelper.ClearandTypeinTextBox(IncorporationDate, eat.GetCellData(strWorksheetName, "IncorporationDate", i)); IncorporationDate.SendKeys(Keys.Tab); TextBoxHelper.ClearandTypeinTextBox(VATRegistrationNumber, randomnumber); ComboBoxHelper.SelectInDropDownByText(Band, eat.GetCellData(strWorksheetName, "Band", i)); ComboBoxHelper.SelectInDropDownByText(MarketingSegmentation, eat.GetCellData(strWorksheetName, "MarketingSegmentation", i)); TextBoxHelper.ClearandTypeinTextBox(CreditLimit, eat.GetCellData(strWorksheetName, "CreditLimit", i)); TextBoxHelper.ClearandTypeinTextBox(RequestedLimit, eat.GetCellData(strWorksheetName, "RequestedLimit", i)); Save.Click(); customerERP = DriverContext.GetDriver <IWebDriver>().FindElement(By.XPath("")).GetAttribute("value"); LogHelper.WriteLog(ConfigReader.logFilePath, "Customer ERP is :-" + customerERP); string customerERPValue = eat.SetCellData(strWorksheetName, "CustomerERP", i, customerERP); } } return(customerERP); }
public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(GlobalId != null ? GlobalId.ToStepValue() : "$"); parameters.Add(OwnerHistory != null ? OwnerHistory.ToStepValue() : "$"); parameters.Add(Name != null ? Name.ToStepValue() : "$"); parameters.Add(Description != null ? Description.ToStepValue() : "$"); parameters.Add(ObjectType != null ? ObjectType.ToStepValue() : "$"); parameters.Add(Identification != null ? Identification.ToStepValue() : "$"); parameters.Add(OriginalValue != null ? OriginalValue.ToStepValue() : "$"); parameters.Add(CurrentValue != null ? CurrentValue.ToStepValue() : "$"); parameters.Add(TotalReplacementCost != null ? TotalReplacementCost.ToStepValue() : "$"); parameters.Add(Owner != null ? Owner.ToStepValue() : "$"); parameters.Add(User != null ? User.ToStepValue() : "$"); parameters.Add(ResponsiblePerson != null ? ResponsiblePerson.ToStepValue() : "$"); parameters.Add(IncorporationDate != null ? IncorporationDate.ToStepValue() : "$"); parameters.Add(DepreciatedValue != null ? DepreciatedValue.ToStepValue() : "$"); return(string.Join(", ", parameters.ToArray())); }