Beispiel #1
0
        public void FollowedAutoReply_AddText_BVT()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"被关注自动回复\添加文字关键词回复");

            FollowedAutoReplyPage.AddAutoReplyText("hello,谢谢关注");
            Thread.Sleep(2 * 1000);
            PortalChromeDriver.TakeScreenShot(filePath, "Portal添加一条回复");
            Assert.IsTrue(Utility.IsAt(FollowedAutoReplyElement.AddedAutoReply, "hello,谢谢关注"));

            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.UnFollowWeChatOffcialAccount();
            Mobile_WeChat_Utility.FollowWeChatOffcialAccount();
            MobileAndroidDriver.GetScreenshot(filePath, "Mobile端check");
            Assert.IsTrue((Mobile_WeChat_Utility.GetLatestMessage("hello,谢谢关注")));
            Mobile_WeChat_Utility.BackButtonClick();

            FollowedAutoReplyPage.AddAutoReplyText("我是更改的文字回复");
            Thread.Sleep(2 * 1000);
            PortalChromeDriver.TakeScreenShot(filePath, "Portal修改文字回复");
            Assert.IsTrue(Utility.IsAt(FollowedAutoReplyElement.AddedAutoReply, "我是更改的文字回复"));

            FollowedAutoReplyPage.Delete();
            Thread.Sleep(2 * 1000);
            PortalChromeDriver.TakeScreenShot(filePath, "Portal删除一条回复");
            Assert.IsFalse(Utility.IsAt(FollowedAutoReplyElement.AddedAutoReply, "我是更改的文字回复"));
        }
        public void FaceRanking_ChangeTheAverage()
        {
            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.FollowWeChatOffcialAccount();
            FaceRankingMobilePage_WeChat.ClickFaceRanking();
            double before1  = 0;
            double after1   = 0;
            double before2  = 0;
            double after2   = 0;
            double before3  = 0;
            double after3   = 0;
            string filePath = PortalChromeDriver.CreateFolder(@"拼颜值\12.检查多次上传测试后,平均值是否被拉高或拉低了");

            FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美女美女);
            FaceRankingMobilePage_WeChat.Getfraction(ref before1, ref after1);
            MobileAndroidDriver.GetScreenshot(filePath, "第一次上传");
            FaceRankingMobilePage_WeChat.BackWards();
            FaceRankingMobilePage_WeChat.ClickFaceRanking();
            FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美女美女);
            FaceRankingMobilePage_WeChat.Getfraction(ref before2, ref after2);
            MobileAndroidDriver.GetScreenshot(filePath, "第二次上传");
            FaceRankingMobilePage_WeChat.BackWards();
            FaceRankingMobilePage_WeChat.ClickFaceRanking();
            FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美女美女);
            FaceRankingMobilePage_WeChat.Getfraction(ref before3, ref after3);
            MobileAndroidDriver.GetScreenshot(filePath, "第三次上传");
            Assert.IsTrue(before1 <= after1 && before2 <= after2 && before3 <= after3);
            Assert.IsTrue(after1 == before2 && after2 == before3);
        }
Beispiel #3
0
        public void FollowedAutoReply_Add_Delete_Edit_Image()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"被关注自动回复\添加图片回复");

            FollowedAutoReplyPage.AddAutoReplyImage(FollowedAutoReplyElement.ImageChoose);
            PortalChromeDriver.TakeScreenShot(filePath, "添加");
            Assert.IsTrue(Utility.IsAt(FollowedAutoReplyElement.AddedImage, "u=115503548,1566568049&fm=23&gp=0.jpg"));

            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.UnFollowWeChatOffcialAccount();
            Mobile_WeChat_Utility.FollowWeChatOffcialAccount();
            Thread.Sleep(5 * 1000);
            Assert.IsTrue(MobileAndroidDriver.IsAt("//android.widget.FrameLayout[contains(@resource-id,'com.tencent.mm:id/a4w')]"), "添加第一页图片");

            filePath = PortalChromeDriver.CreateFolder(@"被关注自动回复\删除图片回复");
            FollowedAutoReplyPage.Delete();
            PortalChromeDriver.TakeScreenShot(filePath, "删除图片回复");
            Assert.IsFalse(Utility.IsAt(FollowedAutoReplyElement.AddedImage, "u=115503548,1566568049&fm=23&gp=0.jpg"), "删除图片");

            filePath = PortalChromeDriver.CreateFolder(@"被关注自动回复\修改图片回复");
            FollowedAutoReplyPage.AddAutoReplyImage(FollowedAutoReplyElement.EditImage);
            Thread.Sleep(2 * 1000);
            PortalChromeDriver.TakeScreenShot(filePath, "修改图片回复");
            Assert.IsTrue(Utility.IsAt(FollowedAutoReplyElement.AddedImage, "1114.png"), "修改图片");
        }
        public void FaceRanking_NoneHuman()
        {
            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.FollowWeChatOffcialAccount();
            FaceRankingMobilePage_WeChat.ClickFaceRanking();
            FaceRankingMobilePage_WeChat.FaceRankingFromFile("mmexport1489570865737.jpg");
            string filePath = PortalChromeDriver.CreateFolder(@"拼颜值\11.检查上传非人物图片的效果");

            MobileAndroidDriver.GetScreenshot(filePath, "11.检查上传非人物图片的效果");
            Assert.IsFalse(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment, "公众号颜值"), "Comment不出现评分");
        }
        public void FaceRanking_Trigger()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"拼颜值\检查输入以下trigger,是否会触发拼颜值功能:");

            Utility.TurnOff();
            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.FollowWeChatOffcialAccount();
            Mobile_WeChat_Utility.ClearAllRecord();
            Mobile_WeChat_Utility.SendMessageWithMenu("拼颜值");
            Thread.Sleep(2 * 1000);
            Assert.IsTrue(Mobile_WeChat_Utility.GetLatestMessage("关闭"));
        }
        public void FaceRanking_Celebrity()
        {
            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.FollowWeChatOffcialAccount();
            FaceRankingMobilePage_WeChat.ClickFaceRanking();
            FaceRankingMobilePage_WeChat.FaceRankingFromFile("mmexport1489570800142.jpg");
            string filePath = PortalChromeDriver.CreateFolder(@"拼颜值\9.检查上传明星图片的效果");

            MobileAndroidDriver.GetScreenshot(filePath, "9.检查上传明星图片的效果");

            Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment, "杨洋"), "未显示明星名字,当前case为林丹");
        }
Beispiel #7
0
        public void AutoReply_ClearAll_TurnOff()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"自动回复\老用户删除所有创建的规则后,停用并且启用关键词回复功能");

            AutoReplyPage.TurnOffAutoReply();

            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.FollowWeChatOffcialAccount();
            //MobileH5.GetToTestAccount();
            Mobile_WeChat_Utility.ResetKeyboard("Appium Android Input Manager for Unicode");
            Mobile_WeChat_Utility.SendMessageWithMenu("a");
            MobileAndroidDriver.GetScreenshot(filePath, "H5关键词精确匹配");
            Assert.IsTrue(!Mobile_WeChat_Utility.GetLatestMessage("[平台测试账号2]说:"));
        }
Beispiel #8
0
        public void FollowedAutoReply_AddedAll_VideoFirst()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"被关注自动回复\同时添加文本图文图片和语音自动回复信息,当前选中的素材被保存并发布到微信公众号上");

            FollowedAutoReplyPage.AddAutoReplyText("hello,谢谢关注");
            FollowedAutoReplyPage.AddAutoReplyImage(FollowedAutoReplyElement.ImageChoose);
            FollowedAutoReplyPage.AddAutoReplyNews(FollowedAutoReplyElement.NewsChoose);
            FollowedAutoReplyPage.AddAutoReplyVideo(FollowedAutoReplyElement.VideoEdit);

            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.UnFollowWeChatOffcialAccount();
            Mobile_WeChat_Utility.FollowWeChatOffcialAccount();

            MobileAndroidDriver.GetScreenshot(filePath, "同时添加所有回复素材,video会上传至微信平台");
            Assert.IsTrue((Mobile_WeChat_Utility.GetLatestMessage("测试视频10")));
        }
        public void FaceRanking_QRCode_Available()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"拼颜值\检查手机端拼颜值页面下面的二位码是否可以正常使用");

            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.FollowWeChatOffcialAccount();
            FaceRankingMobilePage_WeChat.ClickFaceRanking();

            FaceRankingMobilePage_WeChat.ClickQRCode();
            MobileAndroidDriver.GetScreenshot(filePath, "点击二维码是否进入公众号");
            Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerName(Mobile.UIElement.FaceRankingMobileElement.Menuitem));
            FaceRankingMobilePage_WeChat.ClickFaceRanking();
            FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美男美女);
            MobileAndroidDriver.GetScreenshot(filePath, "二维码进去公众号后是否能正常使用拼颜值");
            Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "二维码进去公众号后是否能正常使用拼颜值");
        }
        public void FaceRanking_Link_Available()
        {
            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.FollowWeChatOffcialAccount();
            //拼颜值功能是否正常使用
            string filePath = PortalChromeDriver.CreateFolder(@"拼颜值\5.检查在手机端”拼颜值“功能是否可以正常使用");

            FaceRankingMobilePage_WeChat.ClickFaceRanking();

            FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美女美女);
            MobileAndroidDriver.GetScreenshot(filePath, "图片显示描述语");
            Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "图片显示描述语");

            //分享出去后是否能正常打开
            filePath = PortalChromeDriver.CreateFolder(@"拼颜值\16.测试结果是否可以分享");
            FaceRankingMobilePage_WeChat.ShareToSomeOne();
            FaceRankingMobilePage_WeChat.BackWards();
            FaceRankingMobilePage_WeChat.BackWards();
            FaceRankingMobilePage_WeChat.BackWards();

            FaceRankingMobilePage_WeChat.CheckLinkAvailable();
            MobileAndroidDriver.GetScreenshot(filePath, "分享出去后是否能正常打开");
            Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "分享出去后是否能正常打开");

            //分享之后能否正常使用
            FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美女美女);
            MobileAndroidDriver.GetScreenshot(filePath, "分享出去后是否能正常使用");
            Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "分享出去后是否能正常使用");

            //再次分享后是否正常打开
            FaceRankingMobilePage_WeChat.ShareToSomeOne();
            FaceRankingMobilePage_WeChat.CheckLinkAvailable();
            MobileAndroidDriver.GetScreenshot(filePath, "第二次分享出去后是否能正常打开");
            Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "分享出去后是否能正常打开");
            //二次分享之后能否正常使用
            FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美女美女);
            MobileAndroidDriver.GetScreenshot(filePath, "第二次分享出去后是否能正常使用");
            Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "第二次分享出去后是否能正常使用");
        }
        public void FaceRanking_TurnOff()
        {
            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.FollowWeChatOffcialAccount();
            FaceRankingMobilePage_WeChat.ClickFaceRanking();
            FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美男美女);
            string filePath = PortalChromeDriver.CreateFolder(@"拼颜值\14.检查是否可以正常关闭”拼颜值“的功能");

            MobileAndroidDriver.GetScreenshot(filePath, "关闭前拼颜值正常使用,图片显示描述语");
            Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "关闭前拼颜值正常使用,图片显示描述语");
            //停用拼颜值
            Utility.TurnOff();;
            string turnOffPath = PortalChromeDriver.CreateFolder(@"拼颜值\19.是否可以停用'拼颜值'功能");

            PortalChromeDriver.TakeScreenShot(turnOffPath, "Portal是否能正常关闭拼颜值");
            Assert.IsTrue(!Utility.IsTurnOn(), "Portal是否能正常关闭拼颜值");


            FaceRankingMobilePage_WeChat.BackWards();
            FaceRankingMobilePage_WeChat.ClickFaceRanking();
            MobileAndroidDriver.GetScreenshot(filePath, "关闭拼颜值技能后H5端是否能正常使用");
            Assert.IsFalse(Mobile_WeChat_Utility.IsAt(Mobile.UIElement.FaceRankingMobileElement.AccountFaceRanking), "关闭拼颜值技能后H5端是否能正常使用");
        }
Beispiel #12
0
        public void FollowedAutoReply_Add_Delete_Edit_Video()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"被关注自动回复\添加删除修改视频回复");

            FollowedAutoReplyPage.AddAutoReplyVideo(FollowedAutoReplyElement.VideoChoose);
            PortalChromeDriver.TakeScreenShot(filePath, "添加");
            Assert.IsTrue(Utility.IsAt(FollowedAutoReplyElement.AddedVideo, "测试视频11"), "添加视频回复");

            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.UnFollowWeChatOffcialAccount();
            Mobile_WeChat_Utility.FollowWeChatOffcialAccount();
            Thread.Sleep(5 * 1000);
            MobileAndroidDriver.GetScreenshot(filePath, "验证添加回复");
            Assert.IsTrue((Mobile_WeChat_Utility.GetLatestMessage("测试视频11")), "验证添加回复");

            FollowedAutoReplyPage.Delete();
            PortalChromeDriver.TakeScreenShot(filePath, "删除视频回复");
            Assert.IsFalse(Utility.IsAt(FollowedAutoReplyElement.AddedVideo, "测试视频11"), "删除视频回复");

            FollowedAutoReplyPage.AddAutoReplyVideo(FollowedAutoReplyElement.VideoEdit);
            Thread.Sleep(2 * 1000);
            PortalChromeDriver.TakeScreenShot(filePath, "修改音频回复");
            Assert.IsTrue(Utility.IsAt(FollowedAutoReplyElement.AddedVideo, "测试视频10"), "修改音频回复");
        }
Beispiel #13
0
        public void FollowedAutoReply_Add_Delete_Edit_News()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"被关注自动回复\添加删除修改图文回复并在Mobile端验证");

            FollowedAutoReplyPage.AddAutoReplyNews(FollowedAutoReplyElement.NewsChoose);
            PortalChromeDriver.TakeScreenShot(filePath, "Portal添加图文回复");
            Assert.IsTrue(Utility.IsAt(FollowedAutoReplyElement.AddedImageAndText, "关于“东方万里行” 相关问题"));

            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.UnFollowWeChatOffcialAccount();
            Mobile_WeChat_Utility.FollowWeChatOffcialAccount();
            Thread.Sleep(5 * 1000);
            MobileAndroidDriver.GetScreenshot(filePath, "Mobile check");
            MobileAndroidDriver.ClickElemnetPerName("关于“东方万里行” 相关问题");
            Assert.IsTrue((Mobile_WeChat_Utility.IsAtPerName("关于“东方万里行” 相关问题")));

            FollowedAutoReplyPage.Delete();
            PortalChromeDriver.TakeScreenShot(filePath, "删除图文");
            Assert.IsFalse(Utility.IsAt(FollowedAutoReplyElement.AddedImageAndText, "关于“东方万里行” 相关问题"));

            FollowedAutoReplyPage.AddAutoReplyNews(FollowedAutoReplyElement.EditNews);
            PortalChromeDriver.TakeScreenShot(filePath, "修改图文回复");
            Assert.IsTrue(Utility.IsAt(FollowedAutoReplyElement.AddedImageAndText, "jdw"));
        }