public static void GetLoginCode_Bind() { try { MobileAndroidDriver.GetElementByName(SMSElement.TextMessage).Click(); Thread.Sleep(5 * 1000); var text = MobileAndroidDriver.GetElementByXpath(SMSElement.messageContent).Text; string[] texts = text.Split(',', ':'); PortalChromeDriver.GetElementsByXpath("//*[@id='verification']")[1].Click(); PortalChromeDriver.GetElementsByXpath("//*[@id='verification']")[1].SendKeys(texts[2]); //Click SendButton var loginButton = PortalChromeDriver.GetElementByClassName("sbtn"); loginButton.Click(); } catch (Exception e) { } }
public static void ClearAllAward() { PortalChromeDriver.ClickElementPerXpath(secretRelationshipElement.cs_awards_edit); var elements = PortalChromeDriver.GetElementsByXpath("//*[@id='count']"); foreach (var item in elements) { item.Clear(); } var rateElements = PortalChromeDriver.GetElementsByXpath("//*[@id='rate']"); foreach (var item in rateElements) { item.Clear(); } PortalChromeDriver.ClickElementPerXpath(secretRelationshipElement.cs_awards_edit_ongoing); System.Threading.Thread.Sleep(1 * 1000); }