//Method to Click on complete icon public void clickOnCompleteIcon() { CreateAppService cas = new CreateAppService(); IJavaScriptExecutor js = (IJavaScriptExecutor)Properties.driver; js.ExecuteScript("arguments[0].scrollIntoView(true); ", cas.imgComplete); js.ExecuteScript("arguments[0].click()", cas.imgComplete); }
public void navigateToChooseOffering() { CreateAppService cas = new CreateAppService(); common.Perform(cas.lnkNew, "click", ""); common.Perform(cas.divRequestIcon, "click", ""); common.Perform(cas.divCreateCloudRequest, "click", ""); }
public void fillApplicationServiceDetails(String serviceName, String applicationOwner, String technicalContact, String los) { CreateAppService cas = new CreateAppService(); common.Perform(cas.txtAppServiceName, "sendkeys", serviceName); common.Perform(cas.txtApplicationOwner, "sendkeys", applicationOwner); common.Perform(cas.txtTechnicalContact, "sendkeys", technicalContact); common.Perform(cas.ddlLOS, "sendkeys", los); }
//Method to update service name in Manage Application Service flow public void updateApplicationServiceName(String oldServiceName, String newServiceName) { CreateAppService cas = new CreateAppService(); IJavaScriptExecutor js = (IJavaScriptExecutor)Properties.driver; common.smallwait(); common.Perform(cas.txtApplicationServiceName, "sendkeys", oldServiceName); cas.testNewAppServiceName.Clear(); common.Perform(cas.testNewAppServiceName, "sendkeys", newServiceName); }
//Method to verify that success message is displayed after completed the flow fo a request public void verifyRequestRegisterMessageDisplayed() { CreateAppService cas = new CreateAppService(); IWebElement registerMsg = cas.divRegisterSuccess; common.smallwait(); if (!registerMsg.Displayed) { throw new Exception(); } }
//Method to select offerings option public void SelectOfferings(String offeringName) { /*CreateAppService cas = new CreateAppService(); * common.Perform(cas.txtOfferingSearch, "sendkeys", offeringName); * string offeringXpath = "//li[@data-filter='"+offeringName+"']"; * IWebElement offeringElement = Properties.driver.FindElement(By.XPath(offeringXpath)); * common.Perform(offeringElement, "click", "");*/ CreateAppService cas = new CreateAppService(); // common.Perform(cas.txtOfferingSearch, "sendkeys", offeringName); // common.ElementOperations(cas.txtOfferingSearch, "sendkeys", offeringName,); var wait = new WebDriverWait(Properties.driver, TimeSpan.FromSeconds(50)); wait.Until(ExpectedConditions.ElementIsVisible(By.XPath("//li[text()='All']"))); cas.txtOfferingSearch.SendKeys(offeringName); string offeringXpath = "//li[@data-filter='" + offeringName + "']"; IWebElement offeringElement = Properties.driver.FindElement(By.XPath(offeringXpath)); common.Perform(offeringElement, "click", ""); }