public void Material_Article_Button()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"素材管理\”设置推荐” 功能是否可用");

            MaterialPage.Set_All();
            PortalChromeDriver.ClickElementPerXpath(MaterialElement.Article_Button);
            //Assert.IsTrue(MaterialPage.IsFlaged() == 10, "”设置推荐” 功能是否可用");
            Assert.IsTrue(PortalChromeDriver.GetElementsByCssSelector("div.custom_checkbox.checked").Count == 11);
            Thread.Sleep(5 * 1000);
            PortalChromeDriver.ClickElementPerXpath(MaterialElement.First_checked);
            Assert.IsFalse(MaterialPage.IsClickable(MaterialElement.FirstAward));
        }
 public static bool IsClickablePerCssSelector(string cssSelector)
 {
     try
     {
         PortalChromeDriver.GetElementsByCssSelector(cssSelector);
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
        public void Material_Set_All()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"素材管理\“设置推荐”中的全选框只能设置当前素材页的内容");

            //重置
            MaterialPage.Set_All();
            PortalChromeDriver.ClickElementPerXpath(MaterialElement.Article_Button);
            Thread.Sleep(2 * 1000);
            //取消全部选中
            PortalChromeDriver.ClickElementPerXpath(MaterialElement.Set_All);
            Assert.IsFalse(MaterialPage.IsClickablePerCssSelector("custom_checkbox"));

            PortalChromeDriver.ClickElementPerXpath(MaterialElement.First_checked);
            Assert.IsTrue(Utility.IsAtPerCssSelector("div.custom_checkbox.checked"));
            PortalChromeDriver.ClickElementPerXpath(MaterialElement.Save_Button);

            MaterialPage.TurnToNextPage_Input("2");
            PortalChromeDriver.ClickElementPerXpath(MaterialElement.Article_Button);
            Assert.IsTrue(PortalChromeDriver.GetElementsByCssSelector("div.custom_checkbox.checked").Count == 2);
            PortalChromeDriver.ClickElementPerXpath(MaterialElement.Save_Button);
        }