public bool AreActivitiesSelectedAsCriteria(IEnumerable <string> activities, int rowIndex = -1, bool getLastRow = false) { var row = new StateTransitionTableRowValues(rowIndex, getLastRow); row.LnkActivityCriteria.Click(); var popup = new StateTransitionActivityCriteriaPopup(); popup.SwitchTo(); var returnValue = activities .Select(activity => new Checkbox(By.XPath("//span[text()='" + activity + "']/../../td[1]/input[@type='checkbox']"))) .All(checkbox => checkbox.Checked); popup.BtnCancel.Click(); popup.SwitchBackToParent(); return(returnValue); }
public void ClearActivityCriteria(IEnumerable <string> activities, int rowIndex = -1, bool getLastRow = false) { var row = new StateTransitionTableRowValues(rowIndex, getLastRow); row.LnkActivityCriteria.Click(); var popup = new StateTransitionActivityCriteriaPopup(); popup.SwitchTo(); var checkboxes = activities .Select(activity => new Checkbox(By.XPath("//span[text()='" + activity + "']/../../td[1]/input[@type='checkbox']"))) .Where(checkbox => checkbox.Checked); foreach (var checkbox in checkboxes) { checkbox.Click(); } popup.BtnOk.Click(); popup.SwitchBackToParent(); }
public void SetActivityCriteria(IEnumerable<string> activities, int rowIndex = -1, bool getLastRow = false) { var row = new StateTransitionTableRowValues(rowIndex, getLastRow); row.LnkActivityCriteria.Click(); var popup = new StateTransitionActivityCriteriaPopup(); popup.SwitchTo(); var checkboxes = activities .Select(activity => new Checkbox(By.XPath("//span[text()='" + activity + "']/../../td[1]/input[@type='checkbox']"))) .Where(checkbox => !checkbox.Checked); foreach (var checkbox in checkboxes) { checkbox.Click(); } popup.BtnOk.Click(); popup.SwitchBackToParent(); }
public bool AreActivitiesSelectedAsCriteria(IEnumerable<string> activities, int rowIndex = -1, bool getLastRow = false) { var row = new StateTransitionTableRowValues(rowIndex, getLastRow); row.LnkActivityCriteria.Click(); var popup = new StateTransitionActivityCriteriaPopup(); popup.SwitchTo(); var returnValue = activities .Select(activity => new Checkbox(By.XPath("//span[text()='" + activity + "']/../../td[1]/input[@type='checkbox']"))) .All(checkbox => checkbox.Checked); popup.BtnCancel.Click(); popup.SwitchBackToParent(); return returnValue; }