public void GoogleLoginTest() { GoogleInitialPage googlepage = new GoogleInitialPage(); PageFactory.InitElements(PropertyCollection.driver, googlepage); googlepage.clickLoginBtn(); GoogleLoginPage googleloginpage = new GoogleLoginPage(); PageFactory.InitElements(PropertyCollection.driver, googleloginpage); googleloginpage.Login("*****@*****.**", "Down123123Up"); WebDriverWait wait = new WebDriverWait(PropertyCollection.driver, TimeSpan.FromMinutes(1)); wait.Until(ExpectedConditions.ElementIsVisible(By.CssSelector(".gb_db.gbii"))); Assert.That(googlepage.AvatarIsPresent, Is.True); }
public void LoginError() { PropertyCollection.driver = new ChromeDriver(); PropertyCollection.driver.Navigate().GoToUrl("https://www.google.com/"); GoogleInitialPage googlepage = new GoogleInitialPage(); PageFactory.InitElements(PropertyCollection.driver, googlepage); googlepage.clickLoginBtn(); GoogleLoginPage googleloginpage = new GoogleLoginPage(); PageFactory.InitElements(PropertyCollection.driver, googleloginpage); googleloginpage.Login("*****@*****.**", "Down123123"); WebDriverWait wait = new WebDriverWait(PropertyCollection.driver, TimeSpan.FromMinutes(1)); wait.Until(ExpectedConditions.ElementIsVisible(By.ClassName("dEOOab"))); Assert.That(googleloginpage.ErrorMessageIsDisplayed, Is.True); }