Skip to content

Instantly share code, notes, and snippets.

@NickBaynham
Created March 3, 2020 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NickBaynham/bab736148e41682aee9986588bc2180e to your computer and use it in GitHub Desktop.
Save NickBaynham/bab736148e41682aee9986588bc2180e to your computer and use it in GitHub Desktop.
Registration Form Test with Page Objects
package selfHealingExamples.tests.registration;
import framework.pageObjects.RegistrationForm;
import org.openqa.selenium.By;
import org.testng.annotations.Test;
import static org.testng.AssertJUnit.assertEquals;
public class RegistrationPageObjects extends BaseTest {
@Test
public void TestRegistration() {
RegistrationForm registrationForm = new RegistrationForm(getDriver());
registrationForm.goToPage();
registrationForm.enterFirstName("Ada");
registrationForm.enterLastName("Lovelace");
registrationForm.enterUsername("ALovelace");
registrationForm.enterCity("Orlando");
registrationForm.enterState("FL");
registrationForm.enterZip("32832");
registrationForm.clickAcceptTerms();
registrationForm.clickRegisterButton();
assertEquals(registrationForm.getTitle(), "Self Healing Test Page");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment