예제 #1
0
        public void AddOneLevelMenu_Text()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\添加一级菜单_文本");

            MenuPage.AddMenu("一");
            MenuPage.AddMenu_Text("这里是一级菜单");
            Thread.Sleep(300 * 1000);
            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.GetToTestAccount();
            Mobile_WeChat_Utility.ClickFirstLevelMenu("一");
            MobileAndroidDriver.GetScreenshot(filePath, "是否能成功添加一个一级菜单_文本");
            Assert.IsTrue(Mobile_WeChat_Utility.GetLatestMessageWithMenu().Text == "这里是一级菜单");
        }
예제 #2
0
        public void CheckOnMobile_OtherPhoto()
        {
            string folder = PortalChromeDriver.CreateFolder(@"朋友圈截图\是否支持其他格式图片");

            Utility.TurnOn();
            MomentsSnapPage.DeleteCampain();
            Thread.Sleep(2 * 1000);
            MomentsSnapPage.CreateCampaign("河北");

            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.GetToTestAccount();
            Mobile_WeChat_Utility.SendPhotoFromFileWithMenu("图片 1, 2017-03-15 17:49");
            Thread.Sleep(5 * 1000);
            Assert.IsFalse(Mobile_WeChat_Utility.GetLatestMessageWithMenu().Text.Contains("[平台测试账号2] 说:ok"));
        }
예제 #3
0
        public void AddOneLevelMenu_Video()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\添加一级菜单_视频");

            MenuPage.AddMenu("一级视频");
            MenuPage.AddMenu_Video();
            Thread.Sleep(300 * 1000);
            MobileAndroidDriver.AndroidInitialize();
            Mobile_WeChat_Utility.GetToTestAccount();
            Mobile_WeChat_Utility.ClickFirstLevelMenu("一级视频");
            Thread.Sleep(5 * 1000);
            MobileAndroidDriver.GetScreenshot(filePath, "添加一级菜单_视频");
            Assert.IsTrue((Mobile_WeChat_Utility.GetLatestMessageWithMenu().Text.Contains("测试视频11")));

            filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\删除已添加的视频");
            MenuPage.Delete();
            Thread.Sleep(1 * 1000);
            Assert.IsTrue(Utility.IsAt(MenuElement.Notification, "菜单项不能为空"));
            MobileAndroidDriver.GetScreenshot(filePath, "删除已添加的视频");
        }