public static IControl GetCollapsedTableRow(String tableName, int rowNumber)
        {
            IControl tableNameHost = null;
            IControl tableHost     = GetTableHost(tableName, rowNumber, out tableNameHost);
            IReadOnlyCollection <IControl> rows = SyncUtilities.FindElements_Parent(tableHost.WebElement, By.ClassName("HeaderRowOff"));

            foreach (IControl row in rows)
            {
                IReadOnlyCollection <IControl> cells = SyncUtilities.FindElements_Parent(row.WebElement, By.ClassName("tdCollapseRowNum"));
                foreach (IControl cell in cells)
                {
                    String cellText = Control_PropertyUtilities.GetText(cell);
                    if (cellText.EndsWith("." + rowNumber + "."))
                    {
                        if (Control_ActionUtilities.IsClickable(row.WebElement))
                        {
                            return(row);
                        }
                        else
                        {
                            return(null);
                        }
                    }
                }
            }
            return(null);
        }
 private static Func <IWebDriver, IWebElement> funcWaitForWebElement(IWebElement Locator) // Anonymous function to wait for the element
 {                                                                                        //which  returns the Webelemet or null
     return((x) =>
     {
         if (Locator.Displayed && Control_ActionUtilities.IsClickable(Locator))
         {
             return Locator;
         }
         return null;
     });
 }
        public static bool WaitForObjectToAppearOnPage(IControl ObjectToVerify, string logMessageOnException)
        {
            bool ObjectAppeared = false;

            // if (Control_PropertyUtilities.IsControlNull(ObjectToVerify))
            if (ObjectToVerify.WebElement == null && !Control_ActionUtilities.IsClickable(ObjectToVerify.WebElement))
            {
                int i = 0;
                while (!ObjectAppeared && i < 30)
                {
                    ++i;
                    ObjectAppeared = ObjectToVerify.WebElement.Displayed;
                    // Thread.Sleep(1000);
                }
                return(false);
            }
            return(ObjectAppeared);
        }
Пример #4
0
 public static bool Verifysavedisabled()
 {
     return(Control_ActionUtilities.IsClickable((DS_StudyProperties.Save).WebElement));
 }