/// <summary> /// Click columns /// </summary> /// <param name="driver"></param> public static void ClickColumnsDisabledAndEnabled(IWebDriver driver) { CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//th[@data-field='ReviewerCategory']//a//span[@class ='k-icon k-i-arrowhead-s']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//li[@class='k-item k-columns-item k-state-default']//span[@class='k-sprite k-i-columns']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//li//span//input[@data-index='0']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//li//span//input[@data-index='1']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//li//span//input[@data-index='2']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//li//span//input[@data-index='3']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//li//span//input[@data-index='4']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//li//span//input[@data-index='5']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//li//span//input[@data-index='0']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//li//span//input[@data-index='1']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//li//span//input[@data-index='2']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//li//span//input[@data-index='3']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//li//span//input[@data-index='4']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//li//span//input[@data-index='5']")); }
/// <summary> /// Click sort descending /// </summary> /// <param name="driver"></param> public static void ClickSortDescending(IWebDriver driver) { CommonActions.ClickElement(driver, By.XPath("//th[@data-field='ReviewerCategory']//a//span[@class ='k-icon k-i-arrowhead-s']")); WaitForKendoRefresh(driver); WaitForElementLoad(driver, By.CssSelector(".k-column-menu .k-sort-asc>.k-link")); CommonActions.CheckVisibleAndClickElement(driver, By.CssSelector(".k-column-menu .k-sort-desc>.k-link")); }
/// <summary> /// Select Documents By New Search /// </summary> /// <param name="driver">IWebDriver</param> public static void SelectDocumentsByNewSearch(IWebDriver driver) { if (driver.FindElement(By.XPath("//input[@ng-value='" + DoQuery + "']")).Enabled == true) { CommonActions.ClickElement(driver, By.XPath("//input[@ng-value='" + DoQuery + "']")); CommonActions.EnterTextInTextBox(driver, By.XPath("//input[@ng-model='ProjectWizardController.documentOptions.query.value']"), Resources.Project.SearchQuery); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//button[@ng-click='ProjectWizardController.search()']")); CommonActions.CheckVisibleAndClickElement(driver, By.ClassName(PrimaryButton)); } }
/// <summary> /// Select Documents By Saved Search /// </summary> /// <param name="driver">IWebDriver</param> public static void SelectDocumentsBySavedSearch(IWebDriver driver) { CommonActions.CheckVisibleAndClickElement(driver, By.Id("savedSearchBtn")); CommonActions.ClickElement(driver, By.XPath("//span[@class='" + TagDroplist + "']")); CommonActions.ClickElement(driver, By.XPath("//ul/li[contains(text(), '" + SavedSearchLiName + "')]")); CommonActions.CheckVisibleAndClickElement(driver, By.Id("createBtn")); }
public static void ClickFilterSearch(IWebDriver driver) { CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//th[@data-field='ReviewerCategory']//a//span[@class ='k-icon k-i-arrowhead-s']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//span[@class='k-sprite k-filter']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//span[@class='k-sprite k-filter']")); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//span[@class='k-sprite k-filter']")); WaitForElementLoad(driver, By.XPath("//div//input[@class='k-textbox']")); CommonActions.EnterTextInTextBox(driver, By.XPath("//div//input[@class='k-textbox']"), Resources.Project.Coded); CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//div//button[contains(text(),'Filter')]")); }
/// <summary> /// Select Documents By Tag /// </summary> /// <param name="driver">IWebDriver</param> public static void SelectDocumentsByTag(IWebDriver driver) { CommonActions.CheckVisibleAndClickElement(driver, By.Id("radioBtn")); CommonActions.ClickElement(driver, By.XPath("//span[@class='" + TagDroplist + "']")); CommonActions.ClickElement(driver, By.XPath("//ul/li[contains(text(), '" + SelectedTag + "')]")); //create button var createButton = driver.FindElement(By.Id("createBtn")); createButton.Should().NotBeNull(); if (createButton.Enabled) { createButton.Click(); } else { CommonActions.ClickElement(driver, By.XPath("//ul/li[contains(text(), '" + SpanReviewed + "')]")); } }
/// <summary> /// Click not coded /// </summary> /// <param name="driver"></param> public static void ClickNotCodedDocList(IWebDriver driver) { CommonActions.CheckVisibleAndClickElement(driver, By.Id("Not_Coded")); }
/// <summary> /// Click not relevant /// </summary> /// <param name="driver"></param> public static void ClickNotRelevantDocList(IWebDriver driver) { CommonActions.CheckVisibleAndClickElement(driver, By.Id("Not_Relevant")); }
/// <summary> /// Click project dashboard review /// </summary> /// <param name="driver"></param> public static void ClickProjectDashboardReview(IWebDriver driver) { CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//a[contains(text(),'Project Dashboard')]")); }
/// <summary> /// Click Export button /// </summary> /// <param name="driver"></param> public static void ClickExportCsv(IWebDriver driver) { CommonActions.CheckVisibleAndClickElement(driver, By.Id("btnExport")); }
/// <summary> /// Click first doc button /// </summary> /// <param name="driver"></param> public static void ClickFirstDocButton(IWebDriver driver) { CommonActions.CheckVisibleAndClickElement(driver, By.XPath("//span[@title='First']")); }