Пример #1
0
        public GridCell GetCell(int row, int column)
        {
            string   innerXpath = TableService.GetCell(row, column).GetXPath();
            string   outerXpath = GetCurrentElementXPath();
            string   fullXpath  = outerXpath + innerXpath;
            GridCell cell       = ComponentCreateService.CreateByXpath <GridCell>(fullXpath);

            SetCellMetaData(cell, row, column);
            return(cell);
        }
Пример #2
0
 public virtual void WaitUntilPopulated()
 {
     Bellatrix.Utilities.Wait.ForConditionUntilTimeout(
         () =>
     {
         var rows = ComponentCreateService.CreateAllByXpath <Label>(RowsXPathLocator);
         return(rows != null && rows.Any());
     },
         totalRunTimeoutMilliseconds: 3000,
         sleepTimeMilliseconds: 500);
 }
Пример #3
0
        public IEnumerable <GridCell> GetCells()
        {
            var listOfCells = new List <GridCell>();
            var rowCells    = _parentGrid.TableService.GetRowCells(Index);

            for (int rowCellsIndex = 0; rowCellsIndex < rowCells.Count; rowCellsIndex++)
            {
                var rowCellXPath = rowCells[rowCellsIndex].GetXPath();
                var cell         = ComponentCreateService.CreateByXpath <GridCell>(rowCellXPath);
                _parentGrid.SetCellMetaData(cell, Index, rowCellsIndex);
                listOfCells.Add(cell);
            }

            return(listOfCells);
        }
 public static ComponentsList <TComponent> CreateAllByNameEndingWith <TComponent>(this ComponentCreateService repository, string name, bool shouldCacheFoundElements = false)
     where TComponent : Component => new ComponentsList <TComponent>(new FindNameEndingWithStrategy(name), null);
 public static TComponent CreateByNameEndingWith <TComponent>(this ComponentCreateService repository, string name, bool shouldCacheElement = false)
     where TComponent : Component => repository.Create <TComponent, FindNameEndingWithStrategy>(new FindNameEndingWithStrategy(name), shouldCacheElement);
 public static ComponentsList <TComponent> CreateAllByClassContaining <TComponent>(this ComponentCreateService repository, string classContaining, bool shouldCacheFoundElements = false)
     where TComponent : Component => new ComponentsList <TComponent>(new FindClassContainingStrategy(classContaining), null, shouldCacheFoundElements);
 public static ComponentsList <TComponent> CreateAllByInnerTextContaining <TComponent>(this ComponentCreateService repository, string innerText, bool shouldCacheFoundElements = false)
     where TComponent : Component => new ComponentsList <TComponent>(new FindInnerTextContainsStrategy(innerText), null, shouldCacheFoundElements);
 public static ComponentsList <TComponent> CreateAllByXpath <TComponent>(this ComponentCreateService repository, string xpath, bool shouldCacheFoundElements = false)
     where TComponent : Component => new ComponentsList <TComponent>(new FindXpathStrategy(xpath), null, shouldCacheFoundElements);
 public static ComponentsList <TComponent> CreateAllByLinkText <TComponent>(this ComponentCreateService repository, string linkText, bool shouldCacheFoundElements = false)
     where TComponent : Component => new ComponentsList <TComponent>(new FindLinkTextStrategy(linkText), null, shouldCacheFoundElements);
 public static TComponent CreateByAttributesContaining <TComponent>(this ComponentCreateService repository, string attributeName, string value, bool shouldCacheElement = false)
     where TComponent : Component => repository.Create <TComponent, FindAttributeContainingStrategy>(Find.By.AttributeContaining(attributeName, value), shouldCacheElement);
 public static ComponentsList <TComponent> CreateAllById <TComponent>(this ComponentCreateService repository, string id, bool shouldCacheFoundElements = false)
     where TComponent : Component => new ComponentsList <TComponent>(new FindIdStrategy(id), null, shouldCacheFoundElements);
 public static TComponent CreateByInnerTextContaining <TComponent>(this ComponentCreateService repository, string innerText, bool shouldCacheElement = false)
     where TComponent : Component => repository.Create <TComponent, FindInnerTextContainsStrategy>(new FindInnerTextContainsStrategy(innerText), shouldCacheElement);
 public static ComponentsList <TComponent> CreateAllByAttributesContaining <TComponent>(this ComponentCreateService repository, string attributeName, string value, bool shouldCacheFoundElements = false)
     where TComponent : Component => new ComponentsList <TComponent>(Find.By.AttributeContaining(attributeName, value), null, shouldCacheFoundElements);
 public static TComponent CreateByClassContaining <TComponent>(this ComponentCreateService repository, string cssClassContaining, bool shouldCacheElement = false)
     where TComponent : Component => repository.Create <TComponent, FindClassContainingStrategy>(new FindClassContainingStrategy(cssClassContaining), shouldCacheElement);
 public static TComponent CreateByLinkText <TComponent>(this ComponentCreateService repository, string linkText, bool shouldCacheElement = false)
     where TComponent : Component => repository.Create <TComponent, FindLinkTextStrategy>(new FindLinkTextStrategy(linkText), shouldCacheElement);
 public static TComponent CreateByXpath <TComponent>(this ComponentCreateService repository, string xpath, bool shouldCacheElement = false)
     where TComponent : Component => repository.Create <TComponent, FindXpathStrategy>(new FindXpathStrategy(xpath), shouldCacheElement);
 public static TComponent CreateById <TComponent>(this ComponentCreateService repository, string id, bool shouldCacheElement = false)
     where TComponent : Component => repository.Create <TComponent, FindIdStrategy>(new FindIdStrategy(id), shouldCacheElement);
 public static TComponent CreateByTag <TComponent>(this ComponentCreateService repository, string tag, bool shouldCacheElement = false)
     where TComponent : Component => repository.Create <TComponent, FindTagStrategy>(new FindTagStrategy(tag), shouldCacheElement);