public static void FillDataInConfigureNetworkTraceInputOutput(IWebDriver driver, TestContext context) { AppCommonUtility.FindElementDynamically(driver, "esriCTTaskData"); IWebElement esriCTTaskData = driver.FindElement(By.ClassName("esriCTTaskData")); IList <IWebElement> taskDataList = esriCTTaskData.FindElements(By.ClassName("dijitTitlePaneTitle")); foreach (IWebElement item in taskDataList) { switch (item.FindElement(By.ClassName("dijitTitlePaneTextNode")).Text) { case "Input": FillDataInTaskData(driver, context); item.Click(); break; case "Output": item.Click(); FillDataOutputTaskPanel(driver, context); item.Click(); break; //case "Overview": // item.Click(); // FillDataOverViewPanel(driver, Convert.ToBoolean(context.DataRow["chkVisibleOverview"].ToString()), context.DataRow["bufferDistanceTextOverview"].ToString(), context.DataRow["ddlTextUnitOverview"].ToString(), context.DataRow["minScaleTextOverview"].ToString(), context.DataRow["maxScaleTextOverview"].ToString(), Convert.ToBoolean(context.DataRow["chkSaveToLayerOverView"].ToString()), context.DataRow["ddlTextTargetLayerOverview"].ToString(), context.DataRow["ddlTextIsolatingValvesOverview"].ToString(), context.DataRow["ddlTextIsolatedHydrantsOverview"].ToString(), context.DataRow["ddlTextIsolatedCustomersOverview"].ToString()); // break; //case "Other": // item.Click(); // FillDataOtherPanel(driver, context.DataRow["iamgeHeightTextOther"].ToString(), context.DataRow["imageWidthTextOther"].ToString(), context.DataRow["timeoutTextOther"].ToString(), context.DataRow["displayTextOther"].ToString()); // break; } } //CreateNewClickOKCancel(driver, context); }
public static void ConfigureNetworkSetUrl(IWebDriver driver, TestContext context) { AppCommonUtility.FindElementDynamically(driver, "esriSetButton"); IWebElement setButton = driver.FindElement(By.ClassName("esriSetButton")); setButton.Click(); }
public static void NextButtonClickCreateAppPanel(IWebDriver driver) { AppCommonUtility.FindElementDynamically(driver, "button-container"); IWebElement nextBtnDiv = driver.FindElement(By.ClassName("button-container")); IList <IWebElement> btnList = nextBtnDiv.FindElements(By.ClassName("jimu-float-trailing")); AppCommonUtility.ListClickActionByName(btnList, "Next"); }
public static void ClickConfigSaveButton(IWebDriver driver) { AppCommonUtility.FindElementDynamically(driver, "save-enable"); IWebElement SaveButton = driver.FindElement(By.ClassName("save-enable")); SaveButton.Click(); }
public static void ClickContinueBtn(IWebDriver driver) { AppCommonUtility.FindElementDynamically(driver, "ContinueBtn"); // Click on continue button IWebElement continueBtn = driver.FindElement(By.ClassName("ContinueBtn")); continueBtn.Click(); }
public static void ClickAddWidgetIcon(IWebDriver driver) { AppCommonUtility.FindElementDynamically(driver, "tab-item-title"); IList <IWebElement> ele = driver.FindElements(By.ClassName("tab-item-title")); AppCommonUtility.ListClickActionByName(ele, "Widget"); //IWebElement addIcon = driver.FindElement(By.ClassName("", "Widget")); //addIcon.Click(); }
public static void GeoProcessingServiceUrlClickValidationBtn(IWebDriver driver) { //validate-btn AppCommonUtility.FindElementDynamically(driver, "validate-btn"); IWebElement validateButton = driver.FindElement(By.ClassName("validate-btn")); AppCommonUtility.ClickDisplayedAndEnableElement(validateButton); }
public static void NetworkTraceCreateNewApp(IWebDriver driver) { AppCommonUtility.FindElementDynamically(driver, "create-button"); // Click on continue button IWebElement createButton = driver.FindElement(By.ClassName("create-button")); createButton.Click(); }
public static void EnterGeoProcessingServiceUrl(IWebDriver driver, TestContext context) { AppCommonUtility.FindElementDynamically(driver, "jimu-url-input"); IWebElement geoProcessingServiceUrl = driver.FindElement(By.ClassName("jimu-url-input")); IList <IWebElement> serviceTextBox = geoProcessingServiceUrl.FindElements(By.TagName("input")); // Need to insert data column in Excel serviceTextBox[1].SendKeys(context.DataRow["gpTaskUrl"].ToString()); }
public static void ClickMenuOption(IWebDriver driver, TestContext context) { AppCommonUtility.FindElementDynamically(driver, "config-section"); IWebElement controlTable = driver.FindElement(By.ClassName("config-section")); IList <IWebElement> menuOptions = controlTable.FindElements(By.ClassName("tab-item-title")); // Need to insert Data in excel AppCommonUtility.ListClickActionByName(menuOptions, context.DataRow["menuOption"].ToString()); }
// Get Icon Name public static void NetworkTraceGetFlagName(IWebDriver driver, List <string> iconNames) { AppCommonUtility.FindElementDynamically(driver, "traceControls"); IWebElement DivControl = driver.FindElement(By.ClassName("traceControls")); IList <IWebElement> flagContainer = DivControl.FindElements(By.TagName("label")); foreach (IWebElement item in flagContainer) { iconNames.Add(item.Text); } }
public static void SetTaskSelectRadioButton(IWebDriver driver, TestContext context) { AppCommonUtility.FindElementDynamically(driver, "url-radio"); // Need to insert boolean value in the Excel if (Convert.ToBoolean(context.DataRow["checkRadioButton"].ToString())) { IWebElement addServiceUrl = driver.FindElement(By.ClassName("url-radio")); addServiceUrl.Click(); } }
public static void ClickOnZoonIn(IWebDriver driver, int clickCount) { AppCommonUtility.FindElementDynamically(driver, "esriSimpleSliderIncrementButton"); for (int i = 0; i < clickCount; i++) { //esriSimpleSliderDecrementButton esriSimpleSliderIncrementButton IWebElement zoomIn = driver.FindElement(By.ClassName("esriSimpleSliderDecrementButton")); zoomIn.Click(); Thread.Sleep(2000); } }
public static void SearchForWebMap(IWebDriver driver, TestContext context) { AppCommonUtility.FindElementDynamically(driver, "jimu-input"); IWebElement searchTextBox = driver.FindElement(By.ClassName("jimu-input")); // Need to insert value in excel searchTextBox.SendKeys(context.DataRow["searchForWebMap"].ToString()); IWebElement searchBtn = driver.FindElement(By.ClassName("search-btn")); searchBtn.Click(); }
private static void FillDataInputInPanel(IWebDriver driver, string fillDataToolTip, string ddlOptionName) { IList <IWebElement> inputContainer = driver.FindElements(By.ClassName("field")); AppCommonUtility.FillDataTextBoxUsingLabelName(inputContainer, "Tooltip", fillDataToolTip); DropDownSelect(driver, "Type", ddlOptionName); AppCommonUtility.FindElementDynamically(driver, "symbol-td-item"); IWebElement iconPanel = driver.FindElement(By.ClassName("symbol-td-item")); AppCommonUtility.ClickAndSelectFeature(iconPanel); }
public static void FillDetailsCreateNewApp(IWebDriver driver, TestContext context) { AppCommonUtility.FindElementDynamically(driver, "jimu-popup"); IWebElement appTitle = driver.FindElement(By.ClassName("dijitInputInner")); appTitle.SendKeys(context.DataRow["appData"].ToString() + "_" + DateTime.Now); IWebElement appDescription = driver.FindElement(By.ClassName("dijitTextArea")); appDescription.SendKeys(context.DataRow["appDescription"].ToString()); CreateNewClickOKCancel(driver, context); }
public static void EnterUserCredential(IWebDriver driver, string userName, string password) { AppCommonUtility.FindElementDynamically(driver, "user_username", "Id"); IWebElement agolUserName = driver.FindElement(By.Id("user_username")); agolUserName.SendKeys(userName); IWebElement agolPassword = driver.FindElement(By.Id("user_password")); agolPassword.SendKeys(password); IWebElement signInBtn = driver.FindElement(By.Id("signIn")); signInBtn.Click(); }
public static void SelectMapByName(IWebDriver driver, TestContext context) { AppCommonUtility.FindElementDynamically(driver, "maps-table-div"); // Parent class IList <IWebElement> mapDiv = driver.FindElements(By.ClassName("maps-table-div")); foreach (IWebElement item in mapDiv) { // Flag int i = 0; if (item.Displayed) { // Map div IList <IWebElement> mapItems = driver.FindElements(By.ClassName("map-item-div")); foreach (IWebElement map in mapItems) { if (map.Displayed) { // Name of web map string mapName = map.FindElement(By.TagName("span")).Text; // Need to insert value in excel // if (mapName == context.DataRow["mapName"].ToString()) if (mapName == "Early-Voting webmap AUTO1") { i++; // Click on map IWebElement mapContent = map.FindElement(By.ClassName("jimu-auto-vertical")); mapContent.Click(); break; } } } if (i > 0) { break; } } } // Click on OK button CreateNewClickOKCancel(driver, context); Thread.Sleep(9000); }
// Click on Flag Icon using name public static void NetworkTraceClickFlagIconUsingName(IWebDriver driver, string flagName) { AppCommonUtility.FindElementDynamically(driver, "traceControls"); IWebElement DivControl = driver.FindElement(By.ClassName("traceControls")); IList <IWebElement> flagContainer = DivControl.FindElements(By.TagName("div")); int i = 0; foreach (IWebElement item in flagContainer) { if (string.Equals(item.Text, flagName)) { flagContainer[i + 1].Click(); } i++; } }
// Get Output Name from application public static List <string> NetworkTraceGetOutputNames(IWebDriver driver, List <string> outputNames) { AppCommonUtility.FindElementDynamically(driver, "resultPanelContainer"); Thread.Sleep(5000); IList <IWebElement> outputpanelLabel = driver.FindElements(By.ClassName("dijitTitlePaneTitleFocus")); foreach (var item in outputpanelLabel) { string getTextOutputPanellabel = item.Text; string[] getSplitTextOutputPanel = getTextOutputPanellabel.Split('('); string getSplitTextOutputPanelIndex = getSplitTextOutputPanel[0]; string getSplitTextOutputPanelTrimmed = getSplitTextOutputPanelIndex.TrimEnd(); outputNames.Add(getSplitTextOutputPanelTrimmed); } outputNames.Remove(outputNames[0]); return(outputNames); }
public static void ClickOnEditIconNetworkTrace(IWebDriver driver) { // IList<IWebElement> listContainer = driver.FindElements(By.ClassName("label")); IList <IWebElement> boxContainer = driver.FindElements(By.ClassName("widget-pool-list")); foreach (var item in boxContainer) { // IWebElement lableContainer = item.FindElement(By.ClassName("box")); IList <IWebElement> labelDiv = item.FindElements(By.ClassName("box")); labelDiv[3].Click(); break; } IJavaScriptExecutor js = (IJavaScriptExecutor)driver; js.ExecuteScript("return document.getElementsByClassName('edit-btn')[0].click();"); // Thread.Sleep(5000); AppCommonUtility.FindElementDynamically(driver, "esriCTTaskData"); }
public static void ValidateGeoProcessingServiceUrlClickOK(IWebDriver driver, TestContext context) { Thread.Sleep(1000); AppCommonUtility.FindElementDynamically(driver, "operations"); IWebElement popupOfWidgetSelect = driver.FindElement(By.ClassName("operations")); IList <IWebElement> OKBtnOftask = popupOfWidgetSelect.FindElements(By.ClassName("jimu-float-trailing")); AppCommonUtility.ListClickActionByName(OKBtnOftask, "OK"); //try //{ // AppCommonUtility.FindElementDynamically(driver, "operations"); //} //catch (Exception) //{ // // URL is not valid //} // Click on OK button // CreateNewClickOKCancel(driver, context); }
public static void EditWebApplication(IWebDriver driver) { //item-operations-td AppCommonUtility.FindElementDynamically(driver, "item-operations-td", "ClassName"); IList <IWebElement> appNameContainer = driver.FindElements(By.ClassName("item-operations-td")); //jimu-float-leading foreach (var item in appNameContainer) { IWebElement appEditOption = item.FindElement(By.ClassName("jimu-float-leading")); if (string.Equals(appEditOption.GetAttribute("title"), "Edit")) { IList <IWebElement> listtableitem = driver.FindElements(By.ClassName("list-table-item")); listtableitem[0].Click(); Thread.Sleep(200); appEditOption.Click(); break; } } }
public static void ClickChooseMapButton(IWebDriver driver) { Thread.Sleep(9000); AppCommonUtility.FindElementDynamically(driver, "choose-map-btn"); AppCommonUtility.ClickDisplayedAndEnableElement(driver.FindElement(By.ClassName("choose-map-btn"))); }