public static WebElementLocator OperationButton(this IEntityButtonContainer container, OperationSymbol symbol, string?groupId = null)
        {
            if (groupId != null)
            {
                var groupButton = container.Element.WaitElementVisible(By.Id(groupId));
                if (groupButton.GetAttribute("aria-expanded") != "true")
                {
                    groupButton.Click();
                }

                return(container.ContainerElement().WithLocator(By.CssSelector($"a[data-operation='{symbol.Key}']")));
            }

            return(container.ContainerElement().WithLocator(By.CssSelector($"button[data-operation='{symbol.Key}']")));
        }
Exemplo n.º 2
0
 public static WebElementLocator OperationButton(this IEntityButtonContainer container, OperationSymbol symbol)
 {
     return(container.ContainerElement().WithLocator(By.CssSelector($"button[data-operation='{symbol.Key}']")));
 }