public static void UnFollow() { try { MobileAndroidDriver.ClickElemnetPerName(MobileCommonElement_Weibo.Myself); MobileAndroidDriver.GetElementByXpath(MobileCommonElement_Weibo.Follow).Click(); MobileAndroidDriver.ClickElemnetPerName(MobileCommonElement_Weibo.AllFollowed); //MobileAndroidDriver.GetElementByName(Element_Weibo.Followed_Search).SendKeys("啊"); //ResetKeyboard("搜狗输入法小米版"); //MobileAndroidDriver.androidDriver.PressKeyCode(AndroidKeyCode.KeycodeNumpad_ENTER); MobileAndroidDriver.ClickElemnetPerName(MobileCommonElement_Weibo.FollowedAccount); MobileAndroidDriver.ClickElemnetPerName(MobileCommonElement_Weibo.Chat); //clearAllMessage MobileAndroidDriver.ClickElemnetPerName(MobileCommonElement_Weibo.Setting); MobileAndroidDriver.ClickElemnetPerName(MobileCommonElement_Weibo.ClearHistory); MobileAndroidDriver.ClickElemnetPerName(MobileCommonElement_Weibo.ClearConfirm); MobileAndroidDriver.ClickElemnetPerName(MobileCommonElement_Weibo.Back); MobileAndroidDriver.ClickElemnetPerName(MobileCommonElement_Weibo.Back); MobileAndroidDriver.ClickElemnetPerName(MobileCommonElement_Weibo.Followed); MobileAndroidDriver.ClickElemnetPerName(MobileCommonElement_Weibo.UnFollowed); MobileAndroidDriver.ClickElemnetPerName(MobileCommonElement_Weibo.UnFollowed_Confirm); Mobile_WeChat_Utility.BackButtonClick(); //MobileAndroidDriver.ClickElemnetPerName(MobileCommonElement.Cancle); Mobile_WeChat_Utility.BackButtonClick(); } catch (Exception e) { Mobile_WeChat_Utility.BackButtonClick(); } }
public static void UnFollowWeChatOffcialAccount() { try { MobileAndroidDriver.GetElementByName(MobileCommonElement_WeChat.ContactList).Click(); MobileAndroidDriver.GetElementByName(MobileCommonElement_WeChat.OfficialAccount).Click(); MobileAndroidDriver.GetElementByName(MobileCommonElement_WeChat.TestAccout).Click(); //MobileAndroidDriver.GetElementByXpath("com.tencent.mm:id/qa").Click(); //MobileAndroidDriver.GetElementByXpath(FollowedAutoReplyElement.H5OfficialAccount).Click(); MobileAndroidDriver.GetElementByName("聊天信息").Click(); MobileAndroidDriver.GetElementByName("更多").Click(); MobileAndroidDriver.GetElementByXpath("//android.widget.LinearLayout[@index='3']").Click(); Thread.Sleep(3 * 1000); MobileAndroidDriver.GetElementByName("不再关注").Click(); //MobileAndroidDriver.GetElementByXpath("//android.widget.Button[contains(@resource-id,'com.tencent.mm:id/a_y')]").Click(); } catch (Exception e) { Mobile_WeChat_Utility.BackButtonClick(); } }