Created
March 3, 2020 15:46
-
-
Save NickBaynham/bab736148e41682aee9986588bc2180e to your computer and use it in GitHub Desktop.
Registration Form Test with Page Objects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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