Beispiel #1
0
        public static void LoginWithPhoneNumber(string phoneNumber)
        {
            //Input phoneNumber
            var loginInput = PortalChromeDriver.WaitForPageElementToLoad(By.Id("phoneNumber"), PortalChromeDriver.Instance);

            loginInput.SendKeys(phoneNumber);
            //Send Verification
            var sendVrificationButton = PortalChromeDriver.GetElementByID("sendverification");

            sendVrificationButton.Click();
        }
Beispiel #2
0
 public static void WechatRegister()
 {
     try
     {
         PortalChromeDriver.GetElementByXpath(LoginElement.register).Click();
         PortalChromeDriver.GetElementByXpath(LoginElement.Wechatauth).Click();
         while (PortalChromeDriver.WaitForPageElementToLoad(By.XPath(LoginElement.PhoneNumber), PortalChromeDriver.Instance, 300).Text != "手机号")
         {
             Thread.Sleep(1 * 1000);
         }
     }
     catch (Exception e)
     {
     }
 }
Beispiel #3
0
 public static void AddWechatAccount()
 {
     try
     {
         PortalChromeDriver.GetElementByXpath(HomePageElement.AddAccount).Click();
         PortalChromeDriver.GetElementByXpath(LoginElement.Wechatauth).Click();
         while (PortalChromeDriver.WaitForPageElementToLoad(By.XPath(HomePageElement.AuthComeplete), PortalChromeDriver.Instance, 300).Text != "授权完成并返回首页")
         {
             Thread.Sleep(1 * 1000);
         }
         PortalChromeDriver.GetElementByXpath(HomePageElement.AuthComeplete).Click();
     }
     catch (Exception e)
     {
     }
 }