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(); } } }
public void Can_secretRelationship_ShareToWeibo() { string filePath = PortalChromeDriver.CreateFolder(@"关系识别\4.检查'技能设置'页面的功能按钮是否正常工作"); //设置奖励中奖概率 PortalChromeDriver.ClickElementPerXpath(secretRelationshipElement.RewartSetting); SecretRelationshipPage.ClearAllAward(); SecretRelationshipPage.CheckAward(secretRelationshipElement.Award.Replace("{0}", "4"), "100", "100"); PortalChromeDriver.ClickElementPerXpath(secretRelationshipElement.SkillSetting); string link = FaceRankingPage.CopyLink(); FaceRankingPage.CopyAlertConfirm(); Utility.BackToAllSkill(); PortalChromeDriver.TakeScreenShot(filePath, "返回技能插件页面,拼颜值是否开通"); Assert.IsTrue(Utility.IsAt(secretRelationshipElement.IsTurnOn_AllSkillPage, "(已开启)"), "返回技能插件页面,拼颜值是否开通"); MobileAndroidDriver.AndroidInitialize_Weibo(); Mobile_Weibo_Utility.UnFollow(); Mobile_Weibo_Utility.Follow(); //HI上关系识别正常使用 string filePath5 = PortalChromeDriver.CreateFolder(@"关系识别\5.复制的link是否可以打开"); string filePath10 = PortalChromeDriver.CreateFolder(@"关系识别\10.是否可以正常使用'关系识别'功能"); string filePath11 = PortalChromeDriver.CreateFolder(@"关系识别\11.可以上传照片测试"); ChoosePhotoAndCheck(美女美女); MobileAndroidDriver.GetScreenshot(filePath5, "图片显示是否正确"); MobileAndroidDriver.GetScreenshot(filePath10, "是否可以正常使用'关系识别'功能"); MobileAndroidDriver.GetScreenshot(filePath11, "是否可以正常使用'关系识别'功能"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "图片显示描述语是否正确"); Assert.IsTrue(FaceRankingMobilePage_WeChat.CheckOficailAccountShow("啊_荀"), "公众号名称是否正确显示"); //Assert.IsTrue(MobileAndroidDriver.IsAt(secretRelationshipElement.H5Reward_Resource_id, "reward_25_4"), "奖励是否显示"); filePath = PortalChromeDriver.CreateFolder(@"关系识别\13.分享后是否可以返回到关系识别页面"); FaceRankingMobilePage_Weibo.ShareToWeibo(); MobileAndroidDriver.GetScreenshot(filePath, "分享后回到关系识别页面"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerName("黑科技揭秘:合影中的秘密!"), "分享后回到关系识别页面"); }