public void VerifyTitle() { var pageHelper = new PageHelper(); var assert = new TestAssertions(); if (Title.Displayed) { assert.VerifyText(Title.Text, TITLE); } }
public void CreateAnAccount(Customer customer) { var assert = new TestAssertions(); assert.VerifyText(Title.Text.ToString(), PAGE_TITLE.ToString()); UserName.SendKeys(customer.UserName); Email.SendKeys(customer.Email); Password.SendKeys(customer.Password); SignUpButton.Click(); if (IsTextPersent(By.TagName("body"), EMAIL_EXISTS_ERROR_TEXT)) //This can be handled alot better. We could use a JS method to locate the error element. { SignInButton.Click(); var signIn = new SignIn(driver); signIn.SignInToAccount(customer); } }