public void XacMinh() { XacMinh: if (ElementIsVisible(ButtonNext)) { ButtonNext.Click(); goto XacMinh; } else { return; } }
public SignInPage StepEnterUsername(string username) { EnterUsername.SendKeys(username); ButtonNext.Click(); return(this); }
public bool RunGetMail() { try { if (library.IsLoadingComplete() && library.IsAjaxLoaded(driver)) { ClickButtonNext: if (library.ElementIsVisible(ButtonNext)) { ButtonNext.Click(); goto ClickButtonNext; } else if (library.ElementIsVisible(Menu)) { library.ScrollToElement(Menu); Menu.Click(); if (library.IsLoadingComplete() && library.IsAjaxLoaded()) { if (library.ElementIsVisible(Setting)) { try { library.ScrollToElement(Setting); Setting.Click(); } catch { Email = "Đizz con mẹ Indonesia"; return(false); } if (library.IsLoadingComplete() && library.IsAjaxLoaded() && library.ElementsIsVisible(By.XPath("//div[@class='_5r7k _5r7m']"))) { library.ScrollToElement(Profile[0]); Profile[0].Click(); if (library.IsLoadingComplete() && library.IsAjaxLoaded() && library.ElementsIsVisible(By.XPath("//div//div//h3//span//span"))) { Email = MailInfo[0].Text; return(true); } else { Email = "Không tìm thấy Email"; driver.Close(); return(false); // } } else { Email = "Không tìm thấy Profile"; driver.Close(); return(false); // Không tìm thấy Profile } } else { Email = "Không tìm thấy Setting"; driver.Close(); return(false); // Không tìm thấy Setting } } } else { Email = "Cookie died!"; driver.Close(); return(false); } } return(true); } catch (Exception ex) { Email = ex.Message; driver.Close(); return(false); } finally { GC.Collect(); } }