Пример #1
0
        public int RemoveAllUsers()
        {
            WebElementHelper.WaitUntilVisible(By.XPath(".//div[@data-testid='body']"), 3000);
            var tableBody = weSectionRoot.FindElement(By.XPath(".//div[@data-testid='body']"));
            var tableRows = tableBody.FindElements(By.XPath(".//tr"));

            foreach (var currentRow in tableRows)
            {
                var rowCells = currentRow.FindElements(By.XPath(".//td"));
                _ClickAddOrCancel(false, rowCells[(int)TABLE_COLUMN.AcceptBtnBegin], true);

                var elem = WebElementHelper.WaitUntilVisible(By.XPath(".//button[@id='clickDelete']"), 10000);
                while (!WebElementHelper.SafeClickElement(elem))
                {
                    Thread.Sleep(1500);
                }
            }

            //TODO Implementation
            return(0);
        }