Created
March 3, 2020 15:48
-
-
Save NickBaynham/d27d575e1759fb18c909f250cd56a38a to your computer and use it in GitHub Desktop.
Workflow using Page Objects for Registration Form
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.workflows; | |
import framework.pageObjects.RegistrationForm; | |
import org.openqa.selenium.WebDriver; | |
public class RegistrationWorkflow { | |
private WebDriver driver; | |
public RegistrationWorkflow(WebDriver driver) { | |
this.driver = driver; | |
} | |
public boolean completeRegistration(String firstName, String lastName, String username, String city, String state, String zip, boolean acceptTerms) { | |
RegistrationForm registrationForm = new RegistrationForm(driver); | |
registrationForm.goToPage(); | |
registrationForm.enterFirstName("Ada"); | |
registrationForm.enterLastName("Lovelace"); | |
registrationForm.enterUsername("ALovelace"); | |
registrationForm.enterCity("Orlando"); | |
registrationForm.enterState("FL"); | |
registrationForm.enterZip("32832"); | |
registrationForm.clickAcceptTerms(); | |
registrationForm.clickRegisterButton(); | |
return (registrationForm.getTitle().equals("Self Healing Test Page")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment