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();
     }
 }
 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.º 4
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, "一级菜单"));
        }