Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 4
0
        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')]")));
 }
Exemplo n.º 6
0
 public static IControl GetInputControl_Textbox(IControl tableCell)
 {
     return(SyncUtilities.FindElement_Parent(tableCell.WebElement, By.CssSelector("input[type=text]")));
 }
Exemplo n.º 7
0
        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")));
        }
Exemplo n.º 8
0
 public static IControl Page(string page)
 {
     return(SyncUtilities.FindVisibleElement(By.XPath("//h1[contains(.,'" + page + "')]")));
 }
Exemplo n.º 9
0
 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);
 }
Exemplo n.º 11
0
 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")));
 }
Exemplo n.º 14
0
 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();
 }
Exemplo n.º 15
0
 public static IControl GetIcon(IControl cell)
 {
     return(SyncUtilities.FindElement_Parent(cell.WebElement, By.TagName("img")));
 }
Exemplo n.º 16
0
 public static IControl CodelistNameForSearch()
 {
     return(SyncUtilities.FindVisibleElement(By.Id("ctl00_ctl00_ContentBody_ContentBody_CodeListsControl_grdCodelist_ctl00_ctl02_ctl03_FilterTextBox_colName")));
 }
Exemplo n.º 17
0
 public static IControl GetInputControl_RadioButton(IControl tableCell)
 {
     return(SyncUtilities.FindElement_Parent(tableCell.WebElement, By.CssSelector("input[type=radio]")));
 }
Exemplo n.º 18
0
 public static IControl CodeListSearchOutput()
 {
     return(SyncUtilities.FindVisibleElement(By.CssSelector("# ctl00_ctl00_ContentBody_ContentBody_CodeListsControl_grdCodelist_ctl00_ctl04_lnkDetails")));
 }
Exemplo n.º 19
0
 public static IControl GetLink(IControl tableCell)
 {
     return(SyncUtilities.FindElement_Parent(tableCell.WebElement, By.TagName("a")));
 }
Exemplo n.º 20
0
 public static IControl FilterIconAtPageLevel()
 {
     return(SyncUtilities.FindVisibleElement(By.CssSelector("#ctl00_ctl00_ContentBody_ContentBody_CodeListsControl_grdCodelist_ctl00_ctl02_ctl03_Filter_colName")));
 }
Exemplo n.º 21
0
        static bool HasLink(IWebElement cell, string value)
        {
            IControl c = SyncUtilities.FindElement_Parent(cell, By.LinkText(value));

            return(c != null && c.WebElement != null);
        }
Exemplo n.º 22
0
 public static IControl StudyNameChange()
 {
     return(SyncUtilities.FindVisibleElement(By.Name("ctl00$ctl00$ContentBody$ContentBody$txtStudyName")));
 }
Exemplo n.º 23
0
        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);
 }
Exemplo n.º 28
0
 public static IControl GetFormLink(IControl formCell)
 {
     return(SyncUtilities.FindElement_Parent(formCell.WebElement, By.TagName("a")));
 }
Exemplo n.º 29
0
 public static IControl GetLastPageIcon(IControl pager)
 {
     return(SyncUtilities.FindElement_Parent(pager.WebElement, By.CssSelector("a[title='Go to the last page']")));
 }
Exemplo n.º 30
0
 public static IControl getXpathOfStudy(String study)
 {
     return(SyncUtilities.FindVisibleElement(By.XPath("//*[contains(@class,'ibx-label-text') and text()='" + study + "']")));
 }