public void IntiFaceRanking()
 {
     WeChatManagermentPage.GoToCS_Skill_Page();
     FaceRankingPage.ClickFaceRanking();
     Utility.TurnOn();
     WeChatManagermentPage.GoTo_Menu_Page_FaceRanking();
     if (!Utility.IsAt(MenuElement.FaceRankingMenu, "拼颜值"))
     {
         MenuPage.DeleteMenuItem();
         WeChatManagermentPage.GoToCS_Skill_Page();
         FaceRankingPage.ClickFaceRanking();
         string link = FaceRankingPage.CopyLink();
         FaceRankingPage.CopyAlertConfirm();
         WeChatManagermentPage.GoTo_Menu_Page_FaceRanking();
         MenuPage.AddMenu("拼颜值");
         MenuPage.AddMenu_Link_Wait(link);
         WeChatManagermentPage.GoToCS_Skill_Page();
         FaceRankingPage.ClickFaceRanking();
     }
     else
     {
         WeChatManagermentPage.GoToCS_Skill_Page();
         FaceRankingPage.ClickFaceRanking();
     }
 }
Exemplo n.º 2
0
        public void Menu_NoMaterial_Tips()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\素材库没有素材,是否提示去微信后台添加");

            PortalChromeDriver.ClickElementPerXpath(MenuElement.Account_Arrow_Down);
            Thread.Sleep(5 * 1000);
            PortalChromeDriver.ClickElementPerXpath(MenuElement.Logout);
            LoginPage.LoginWithPhoneNumber("13269120258");
            Thread.Sleep(10 * 1000);

            MobileAndroidDriver.AndroidMmsInitialize();
            Mobile_WeChat_Utility.GetLoginCode();

            HomePage.ClickWeChatApp("不是衣橱的海南");
            WeChatManagermentPage.GoTo_Menu_Page();
            MenuPage.DeleteMenuItem();
            MenuPage.AddMenu("1");
            PortalChromeDriver.ClickElementPerXpath(MenuElement.Send_Message);
            PortalChromeDriver.ClickElementPerXpath(MenuElement.tabNews);
            PortalChromeDriver.ClickElementPerXpath(MenuElement.ImageChoose);
            //PortalChromeDriver.TakeScreenShot(filePath, "素材库没有素材,是否提示去微信后台添加");
            Thread.Sleep(2 * 1000);

            Assert.IsTrue(Utility.IsAt(MenuElement.NoMaterial_Tip, "没有同步到素材,请去往微信后台添加。新添加素材最多需15分钟同步到本地。"));
            //Assert.IsTrue(PortalChromeDriver.GetElementByClassName("menu_button menu_highlight").Text=="1");
        }
Exemplo n.º 3
0
        public void AddOneLevelMenu_More()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\是否能成功添加一个一级菜单");

            MenuPage.AddMenu("一");
            MenuPage.AddMenu_Link("https://www.google.com");

            filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\是否能成功添加第二个一级菜单");
            MenuPage.AddMenu("二");
            MenuPage.AddMenu_Link("https://www.google.com");
            PortalChromeDriver.TakeScreenShot(filePath, "是否能成功添加第二个一级菜单");
            Assert.IsTrue(Utility.IsAt(MenuElement.SecondMenu, "二"));

            filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\是否能成功添加第三个一级菜单");
            MenuPage.AddMenu("三");
            MenuPage.AddMenu_Link("https://www.google.com");
            PortalChromeDriver.TakeScreenShot(filePath, "是否能成功添加第三个一级菜单");
            Assert.IsTrue(Utility.IsAt(MenuElement.ThirdMenu, "三"));

            filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\是否能成功添加第四个一级菜单");
            PortalChromeDriver.ClickElementPerXpath(MenuElement.add_menu_item_btn);
            PortalChromeDriver.TakeScreenShot(filePath, "是否能成功添加第四个一级菜单");
            Assert.IsTrue(Utility.IsAt(MenuElement.Alert_Failure, "最多只能添加三个一级菜单,当前已达设置上限"));

            PortalChromeDriver.ClickElementPerXpath(MenuElement.Alert_Failure_Confirm);
            MenuPage.DeleteMenuItem();
            Thread.Sleep(2 * 1000);
            filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\是否能够成功删除所有一级菜单");
            PortalChromeDriver.TakeScreenShot(filePath, "是否能够成功删除所有一级菜单");
            Assert.IsFalse(Utility.IsAt(MenuElement.addedMenu, "三"));
        }
 public void IntiFaceRanking()
 {
     try
     {
         PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
         FaceRankingPage.ClickFaceRanking();
         Utility.TurnOn();
         WeChatManagermentPage.GoTo_Menu_Page_FaceRanking();
         if (!Utility.IsAt(MenuElement.FaceRankingMenu, "拼颜值"))
         {
             MenuPage.DeleteMenuItem();
             PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
             FaceRankingPage.ClickFaceRanking();
             string link = FaceRankingPage.CopyLink();
             FaceRankingPage.CopyAlertConfirm();
             WeChatManagermentPage.GoTo_Menu_Page_FaceRanking();
             MenuPage.AddMenu("拼颜值");
             MenuPage.AddMenu_Link_Wait(link);
             PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
             FaceRankingPage.ClickFaceRanking();
         }
         else
         {
             PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
             FaceRankingPage.ClickFaceRanking();
         }
     }
     catch (Exception e)
     {
         //PortalChromeDriver.Instance.Navigate().GoToUrl(PortalChromeDriver.BaseProductAddress);
         LoginPage_Weibo.AddWeiboAccount();
         HomePage.ClickWeChatApp("啊_荀");
         PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
         FaceRankingPage.ClickFaceRanking();
         Utility.TurnOn();
         WeChatManagermentPage.GoTo_Menu_Page_FaceRanking();
         if (!Utility.IsAt(MenuElement.FaceRankingMenu, "拼颜值"))
         {
             MenuPage.DeleteMenuItem();
             PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
             FaceRankingPage.ClickFaceRanking();
             string link = FaceRankingPage.CopyLink();
             FaceRankingPage.CopyAlertConfirm();
             WeChatManagermentPage.GoTo_Menu_Page_FaceRanking();
             MenuPage.AddMenu("拼颜值");
             MenuPage.AddMenu_Link_Wait(link);
             PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
             FaceRankingPage.ClickFaceRanking();
         }
         else
         {
             PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
             FaceRankingPage.ClickFaceRanking();
         }
     }
 }
 public void IntiSecretRelationship()
 {
     try {
         PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
         FaceRankingPage.ClickFaceRanking();
         Utility.TurnOn();
         WeChatManagermentPage.GoTo_Menu_Page_FaceRanking();
         if (!Utility.IsAt(MenuElement.FaceRankingMenu, "关系识别"))
         {
             MenuPage.DeleteMenuItem();
             PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
             SecretRelationshipPage.ClickSecretRelationship_Weibo();
             SecretRelationshipPage.TurnOn();
             string link = FaceRankingPage.CopyLink();
             FaceRankingPage.CopyAlertConfirm();
             WeChatManagermentPage.GoTo_Menu_Page_FaceRanking();
             MenuPage.AddMenu("关系识别");
             MenuPage.AddMenu_Link_Wait(link);
             PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
             SecretRelationshipPage.ClickSecretRelationship_Weibo();
         }
         else
         {
             PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
             SecretRelationshipPage.ClickSecretRelationship_Weibo();
         }
     }
     catch (Exception e)
     {
         LoginPage_Weibo.AddWeiboAccount();
         HomePage.ClickWeChatApp("啊_荀");
         PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
         FaceRankingPage.ClickFaceRanking();
         Utility.TurnOn();
         WeChatManagermentPage.GoTo_Menu_Page_FaceRanking();
         if (!Utility.IsAt(MenuElement.FaceRankingMenu, "关系识别"))
         {
             MenuPage.DeleteMenuItem();
             PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
             FaceRankingPage.ClickFaceRanking();
             string link = FaceRankingPage.CopyLink();
             FaceRankingPage.CopyAlertConfirm();
             WeChatManagermentPage.GoTo_Menu_Page_FaceRanking();
             MenuPage.AddMenu("拼颜值");
             MenuPage.AddMenu_Link_Wait(link);
             PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
             FaceRankingPage.ClickFaceRanking();
         }
         else
         {
             PortalChromeDriver.ClickElementPerXpath(DocChatElement.CS_SKills_Weibo);
             FaceRankingPage.ClickFaceRanking();
         }
     }
 }
Exemplo n.º 6
0
        public void AddOneLevelMenu_Link()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\添加一级菜单_链接");

            MenuPage.AddMenu("一级菜单");
            MenuPage.AddMenu_Link_Wait("https://www.google.com");

            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.GetToTestAccount();
            Mobile_WeChat_Utility.ClickFirstLevelMenu("一级菜单");
            MobileAndroidDriver.GetScreenshot(filePath, "是否能成功添加一个一级菜单;在一级菜单里是否能成功设置一个跳转网页;是否能够成功删除所有菜单,点击界面下方的”删除”按钮");
            Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerName("Google"));

            filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\是否能够成功删除所有菜单,点击界面下方的”删除”按钮");
            MenuPage.DeleteMenuItem();
            Assert.IsFalse(Utility.IsAt(MenuElement.addedMenu, "一级菜单"));
        }
        public void Can_StaffBind_IfTimeOut()
        {
            string foler = PortalChromeDriver.CreateFolder(@"HI\29.[客服人员设定]是否可以正常使用,当登陆密码有效期超过60s时");

            WeChatManagermentPage.GoTo_Menu_Page();
            MenuPage.DeleteMenuItem();

            //确保HI是Turn on的状态
            WeChatManagermentPage.GoToHIPage();
            HIPage.TurnOnSetup();
            //切换到Hi的设置Tab页
            HIPage.SwichHISettingTab(HIPortalPageUIElement.SubTabHIStaff);
            //判断是否已经绑定客服,如果绑定,则删除客服
            HIPage.DeleteStaff();
            //获取绑定客服验证码
            var value = HIPage.GetLoginCode();

            //等待60秒,超过有效期
            Thread.Sleep(60 * 1000);
            //H5页面进入平台测试账号对话窗口
            Mobile_WeChat_Utility.GetToTestAccount();
            Mobile_WeChat_Utility.ClearAllRecord();
            //发送验证码
            Mobile_WeChat_Utility.SendMessage(value);
            MobileAndroidDriver.GetScreenshot(foler, "验证H5是否正确输入验证码");
            PortalChromeDriver.TakeScreenShot(foler, "验证Portal端客服是否绑定成功");
            Assert.IsFalse(Mobile_WeChat_Utility.IsStaffBind());

            foler = PortalChromeDriver.CreateFolder(@"HI\30.[客服人员设定]是否可以正常使用,当登陆密码过期后重新获取");
            value = HIPage.GetLoginCode();
            //删除聊天记录
            Mobile_WeChat_Utility.ClearAllRecord();
            //发送验证码
            Mobile_WeChat_Utility.SendMessage(value);
            //MobileH5.SendMessageWithMenu(value);
            Thread.Sleep(5 * 1000);

            PortalChromeDriver.TakeScreenShot(foler, "验证登陆密码过期后重新获取是否正常绑定");
            Assert.IsTrue(Mobile_WeChat_Utility.IsStaffBind());
        }
Exemplo n.º 8
0
 public void IntiSecretRelationship()
 {
     WeChatManagermentPage.GoTo_Menu_Page();
     MenuPage.DeleteMenuItem();
 }