//Enter request information in the send request form internal void AddRequstInformation() { // Populating the data from Excel ExcelLib.PopulateInCollection(Base.ExcelPath, "Send Request"); string tenant = ExcelLib.ReadData(2, "Tenant"); string type = ExcelLib.ReadData(2, "Type"); //choose tenant from dropdown list TenantText.Click(); Driver.WaitForElementClickable(Driver.driver, By.XPath(String.Format("//div[@class='item'][contains(text(),'{0}')]", tenant)), 5); Driver.driver.FindElement(By.XPath(String.Format("//div[@class='item'][contains(text(),'{0}')]", tenant))).Click(); //choose type from dropdown list SelectElement select2 = new SelectElement(TypeDropdown); select2.SelectByText(type); //enter description DescriptionText.SendKeys(ExcelLib.ReadData(2, "Description")); //upload files ChooseFilesButton.SendKeys(ExcelLib.ReadData(2, "Choose Files")); }
internal void AddRequstInformation() { // Populating the data from Excel ExcelLib.PopulateInCollection(Base.ExcelPath, "Send Request"); string tenant = ExcelLib.ReadData(2, "Tenant"); string type = ExcelLib.ReadData(2, "Type"); //choose tenant from dropdown list TenantText.Click(); Driver.driver.FindElement(By.XPath(String.Format(".//*[@id='main-content']/section/div/div[1]/div[2]/div/div[2]/div[text()='{0}']", tenant))).Click(); //choose type from dropdown list SelectElement select2 = new SelectElement(TypeDropdown); select2.SelectByText(type); //enter description DescriptionText.SendKeys(ExcelLib.ReadData(2,"Description")); //upload files ChooseFilesButton.SendKeys(ExcelLib.ReadData(2, "Choose Files")); }