public static IControl getFormsName(String formName) { return(SyncUtilities.FindVisibleElement(By.XPath("//*[contains(@class,'ibx-label-text') and text()='" + formName + "']"))); }
static IControl PageNumberLink(IControl pager, int pageNumber) { IControl pageNumbersHost = SyncUtilities.FindElement_Parent(pager.WebElement, By.ClassName("k-pager-numbers")); return(SyncUtilities.FindElement_Parent(pageNumbersHost.WebElement, By.LinkText(pageNumber.ToString()))); }
internal static void ValidateUnicodeInfoOnUserNameAndPassword(string userName, SecureString password, Task.TaskErrorLoggingDelegate taskErrorLoggingDelegate) { SyncUtilities.ThrowIfArgumentNullOrEmpty("userName", userName); SyncUtilities.ThrowIfArgumentNull("password", password); SyncUtilities.ThrowIfArgumentNull("taskErrorLoggingDelegate", taskErrorLoggingDelegate); if (SyncUtilities.HasUnicodeCharacters(userName) || (password.Length > 0 && SyncUtilities.HasUnicodeCharacters(password))) { taskErrorLoggingDelegate(new InvalidOperationException(Strings.InvalidUnicodeCharacterUsage), ErrorCategory.InvalidArgument, null); } }
static bool HasCheckboxAndText(IWebElement cell, string value) { IControl c = SyncUtilities.FindElement_Parent(cell, By.TagName("input")); return(c != null && c.WebElement != null && value.Equals(cell.Text.Trim())); }
public static IControl SelectErrorFromDropDown(string SelectDropDownOption, string dropDownList) { return(SyncUtilities.FindVisibleElement(By.XPath("//ul/li/label[contains(.,'Conversion factor cannot be zero')]"))); }
public static IControl GetInputControl_Textbox(IControl tableCell) { return(SyncUtilities.FindElement_Parent(tableCell.WebElement, By.CssSelector("input[type=text]"))); }
public static ReadOnlyCollection <IControl> GetRows(IControl webTable) { IControl tableBody = SyncUtilities.FindElement_Parent(webTable.WebElement, By.TagName("tbody")); return(SyncUtilities.FindElements_Parent(tableBody.WebElement, By.TagName("tr"))); }
public static IControl Page(string page) { return(SyncUtilities.FindVisibleElement(By.XPath("//h1[contains(.,'" + page + "')]"))); }
public static IControl CodelistName(string page) { return(SyncUtilities.FindVisibleElement(By.CssSelector("# ctl00_ctl00_ContentBody_ContentBody_CodeListsControl_grdCodelist_ctl00_ctl02_ctl03_FilterTextBox_colName"))); }
static IControl GetFilterCell(IControl filterRow, int columnIndex) { if (filterRow != null && filterRow.WebElement != null) { System.Collections.ObjectModel.ReadOnlyCollection <IControl> filterCellList = SyncUtilities.FindElements_Parent(filterRow.WebElement, By.TagName("th")); if (columnIndex < filterCellList.Count) { return(filterCellList[columnIndex]); } } return(null); }
public static IControl Tab(string tab) { return(SyncUtilities.FindVisibleElement(By.XPath("//a[contains(text(),'" + tab + "')]"))); }
public static IControl GetRowOfFormInCreateDatGroupTable(string formName) { return(SyncUtilities.FindVisibleElement(By.XPath("//span[text()='" + formName + "']/parent::td/parent::tr"))); }
public static IControl ExpandFormIcon(string FormName) { return(SyncUtilities.FindVisibleElement(By.XPath("//span[text()='" + FormName + "']//parent::td/preceding-sibling::td//a"))); }
protected override void ValidateWithDataObject(IConfigurable dataObject) { base.ValidateWithDataObject(dataObject); if (this.Password != null) { DeltaSyncUserAccount account = DeltaSyncUserAccount.CreateDeltaSyncUserForTrustedPartnerAuthWithPassword(((HotmailSubscriptionProxy)dataObject).EmailAddress.ToString(), SyncUtilities.SecureStringToString(this.Password)); LocalizedException exception; if (!DeltaSyncAutoProvision.ValidateUserHotmailAccount(account, CommonLoggingHelper.SyncLogSession, out this.accountSettings, out exception)) { base.WriteDebugInfoAndError(exception, ErrorCategory.InvalidArgument, null); } } base.WriteDebugInfo(); }
public static IControl GetIcon(IControl cell) { return(SyncUtilities.FindElement_Parent(cell.WebElement, By.TagName("img"))); }
public static IControl CodelistNameForSearch() { return(SyncUtilities.FindVisibleElement(By.Id("ctl00_ctl00_ContentBody_ContentBody_CodeListsControl_grdCodelist_ctl00_ctl02_ctl03_FilterTextBox_colName"))); }
public static IControl GetInputControl_RadioButton(IControl tableCell) { return(SyncUtilities.FindElement_Parent(tableCell.WebElement, By.CssSelector("input[type=radio]"))); }
public static IControl CodeListSearchOutput() { return(SyncUtilities.FindVisibleElement(By.CssSelector("# ctl00_ctl00_ContentBody_ContentBody_CodeListsControl_grdCodelist_ctl00_ctl04_lnkDetails"))); }
public static IControl GetLink(IControl tableCell) { return(SyncUtilities.FindElement_Parent(tableCell.WebElement, By.TagName("a"))); }
public static IControl FilterIconAtPageLevel() { return(SyncUtilities.FindVisibleElement(By.CssSelector("#ctl00_ctl00_ContentBody_ContentBody_CodeListsControl_grdCodelist_ctl00_ctl02_ctl03_Filter_colName"))); }
static bool HasLink(IWebElement cell, string value) { IControl c = SyncUtilities.FindElement_Parent(cell, By.LinkText(value)); return(c != null && c.WebElement != null); }
public static IControl StudyNameChange() { return(SyncUtilities.FindVisibleElement(By.Name("ctl00$ctl00$ContentBody$ContentBody$txtStudyName"))); }
static bool HasDropdown(IWebElement cell) { IControl c = SyncUtilities.FindElement_Parent(cell, By.TagName("select")); return(c != null && c.WebElement != null); }
public static IControl GetLink(String linkName) { return(SyncUtilities.FindVisibleElement(By.LinkText(linkName))); }
public static IControl GetFirstPageIcon(IControl pager) { return(SyncUtilities.FindElement_Parent(pager.WebElement, By.CssSelector("#gridReferenceRanges > div.k-pager-wrap.k-grid-pager.k-widget.k-floatwrap > a.k-link.k-pager-nav.k-pager-first"))); }
public static IControl GetPermissionForCategory(String Category, String Permission) { return(SyncUtilities.FindElement(By.XPath("//*[@id='" + Category + "']/following::td[@id='" + Permission + "']"))); }
public static bool SourceTargetStudy(List <StudyCompareReportData> sourcetargetData) { try { foreach (StudyCompareReportData sourcetargetitem in sourcetargetData) { IControl TargetCodelistTable = SyncUtilities.FindVisibleElement(By.Id("LabAttributeReference_0_CodeListMappingsReference_0_CodelistMapping_TT")); IControl SourceCodelistTable = SyncUtilities.FindVisibleElement(By.Id("LabAttributeReference_0_CodeListMappingsReference_0_CodelistMapping_ST")); ReadOnlyCollection <IControl> srows = null; ReadOnlyCollection <IControl> trows = null; if (WebTableUtilities.GetRowCount(SourceCodelistTable, out srows) > 0 && WebTableUtilities.GetRowCount(TargetCodelistTable, out trows) > 0) { for (int rowIndex = 0; rowIndex < srows.Count; rowIndex++) { bool sfound = false; //WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList(); //searchList.AddSearchItem(new WebTable_SearchCriteriaItem(1, sourcetargetitem.SourceStudy, TableColumnContentType.Text)); //IControl row = WebTableUtilities.Table_FindRow(SourceCodelistTable, searchList, 1); IControl sourcecelldata = WebTableUtilities.GetCell(srows[rowIndex], 1); String sourceattribureValue = Control_PropertyUtilities.GetAttributeValue(sourcecelldata, "class", out sfound); if (sfound) { ReadOnlyCollection <IControl> targetTablerows = SyncUtilities.FindVisibleElements_Parent(TargetCodelistTable.WebElement, By.TagName("tr")); if (sourceattribureValue.Equals("modified")) { bool tfound; IControl targetcelldata = WebTableUtilities.GetCell(targetTablerows[rowIndex], 1); String targetattribureValue = Control_PropertyUtilities.GetAttributeValue(targetcelldata, "class", out tfound); if (targetattribureValue.Contains("modified-cell")) { Control_PropertyUtilities.CompareCSSValue(targetcelldata, "background-color", "#fcdc75"); } } else if (sourceattribureValue.Equals("deleted")) { bool tfound; IControl targetcelldata = WebTableUtilities.GetCell(targetTablerows[rowIndex], 1); String targetattribureValue = Control_PropertyUtilities.GetAttributeValue(targetcelldata, "class", out tfound); if (targetattribureValue.Equals("removedCell")) { Control_PropertyUtilities.CompareCSSValue(sourcecelldata, "background-color", "#fcdc75"); } } } else if (!sfound) { ReadOnlyCollection <IControl> targetTablerows = SyncUtilities.FindVisibleElements_Parent(TargetCodelistTable.WebElement, By.TagName("tr")); if (sourceattribureValue.Contains("removedCell")) { bool tfound; IControl targetcelldata = WebTableUtilities.GetCell(targetTablerows[rowIndex], 1); String targetattribureValue = Control_PropertyUtilities.GetAttributeValue(targetcelldata, "class", out tfound); if (targetattribureValue.Contains("added")) { Control_PropertyUtilities.CompareCSSValue(targetcelldata, "background-color", "#fcdc75"); } } } else if (!sfound) { ReadOnlyCollection <IControl> targetTablerows = SyncUtilities.FindVisibleElements_Parent(TargetCodelistTable.WebElement, By.TagName("tr")); if (sourceattribureValue.Contains("deleted")) { bool tfound; IControl targetcelldata = WebTableUtilities.GetCell(targetTablerows[rowIndex], 1); String targetattribureValue = Control_PropertyUtilities.GetAttributeValue(targetcelldata, "class", out tfound); if (targetattribureValue.Contains("removedCell")) { Control_PropertyUtilities.CompareCSSValue(targetcelldata, "background-color", "#fcdc75"); } } } } } } } catch (Exception e) { } return(false); }
public static IControl GetFormLink(IControl formCell) { return(SyncUtilities.FindElement_Parent(formCell.WebElement, By.TagName("a"))); }
public static IControl GetLastPageIcon(IControl pager) { return(SyncUtilities.FindElement_Parent(pager.WebElement, By.CssSelector("a[title='Go to the last page']"))); }
public static IControl getXpathOfStudy(String study) { return(SyncUtilities.FindVisibleElement(By.XPath("//*[contains(@class,'ibx-label-text') and text()='" + study + "']"))); }