コード例 #1
0
        public static void DialogWindowBtnClick()
        {
            WaitHelper.WaitToDialogWindow();

            SeleniumDriver.driver.FindElement(By.XPath("//button")).Click();

            WaitHelper.WaitToFinishloading();
        }
コード例 #2
0
        public static void SetReporsForRole()
        {
            GridHelper.GridId = "entityRolesDetailsGrid";
            var tableRows = GridHelper.GetGridRows();


            foreach (var row in tableRows)
            {
                var rowBtns = row.FindElements(By.TagName("a"));

                try
                {
                    if (row.Text.Contains("דוחות"))
                    {
                        var reportsBtn = rowBtns[2];

                        reportsBtn.Click();

                        WaitHelper.Wait.Until(ExpectedConditions.ElementToBeClickable(By.ClassName("close-button")));
                        Thread.Sleep(500);
                        var window = SeleniumDriver.driver.FindElement(By.XPath("/html/body/div[4]"));

                        var taxnomyDropDown = SeleniumDriver.driver.FindElement(By.ClassName("k-dropdown"));

                        GridHelper.GridId = "entityRolesDetailsGrid_ReportsWindow_reportsGrid";

                        tableRows           = GridHelper.GetGridRows();
                        PermissionsToReport = tableRows[0].Text;

                        var input = tableRows[0].FindElement(By.TagName("input"));
                        input.Click();

                        var saveBtn = window.FindElement(By.ClassName(" k-grid-save-changes"));
                        saveBtn.Click();

                        WaitHelper.WaitToDialogWindow();
                        SeleniumDriver.driver.FindElement(By.XPath("//button")).Click();
                        Thread.Sleep(500);

                        WaitHelper.Wait.Until(ExpectedConditions.ElementToBeClickable(By.ClassName("close-button")));
                        var closeBtn = window.FindElement(By.ClassName("close-button"));
                        closeBtn.Click();
                        Thread.Sleep(500);
                    }
                }
                catch (Exception)
                {
                    continue;
                }
            }
        }
コード例 #3
0
        public static void AddRoleThatExsistinEntity(int role)
        {
            AddEntity(role);
            try
            {
                WaitHelper.WaitToDialogWindow();

                SeleniumDriver.driver.FindElement(By.XPath("//button")).Click();
                Thread.Sleep(500);
            }
            catch (Exception)
            {
                Assert.Fail("AddRoleThatExsistinEntity fail");
            }
        }