Created
March 3, 2020 16:05
-
-
Save NickBaynham/6320901fc74d94df7b4e8ee0bffdf9fb to your computer and use it in GitHub Desktop.
A test of the registration form using Auto Discovery in 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.RegistrationFormAutoDiscovery; | |
import io.nickbaynham.automation.selfhealing.BrowserNotAvailableException; | |
import io.nickbaynham.automation.selfhealing.Tag; | |
import io.nickbaynham.automation.selfhealing.controllers.DocumentController; | |
import io.nickbaynham.automation.selfhealing.controllers.ElementNotFoundException; | |
import org.openqa.selenium.By; | |
import org.testng.annotations.Test; | |
import static org.testng.AssertJUnit.assertEquals; | |
public class RegistrationAutoDiscoveryPageObjectsTest extends BaseTest { | |
@Test | |
public void TestRegistrationPageObjectsWithAutoDiscovery() throws ElementNotFoundException, BrowserNotAvailableException { | |
RegistrationFormAutoDiscovery registration = new RegistrationFormAutoDiscovery(getDriver()); | |
registration.goToPage(); | |
registration.enterText("First Name", "Ada"); | |
registration.enterText("Last Name", "Lovelace"); | |
registration.enterText("Username", "AdaL"); | |
registration.enterText("City", "Orlando"); | |
registration.enterText("State", "FL"); | |
registration.enterText("Zip", "32832"); | |
registration.clickCheckBox("Accept Terms"); | |
registration.clickButton("Register"); | |
assertEquals("Self Healing Test Page", registration.getTitle()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment