Commit 479b3920 authored by Shaphen Pangburn's avatar Shaphen Pangburn

Refactor xpaths to look cleaner

parent 61f0fef1
...@@ -15,11 +15,11 @@ public class AccountSettingsPage { ...@@ -15,11 +15,11 @@ public class AccountSettingsPage {
WebDriver driver; WebDriver driver;
@FindBy(xpath = "//*[@id='input-firstName']") @FindBy(xpath = "//*[@id='input-firstName']")
public WebElement accountFirstName; public WebElement accountFirstName;
@FindBy(xpath = "//*[@id=\"input-lastName\"]") @FindBy(xpath = "//*[@id='input-lastName']")
public WebElement accountLastName; public WebElement accountLastName;
@FindBy(xpath = "//*[@id=\"emailIdaccount\"]") @FindBy(xpath = "//*[@id='emailIdaccount']")
public WebElement accountEmail; public WebElement accountEmail;
@FindBy(xpath = "//*[@id=\"phoneNumber\"]") @FindBy(xpath = "//*[@id='phoneNumber']")
public WebElement accountPhoneNumber; public WebElement accountPhoneNumber;
public AccountSettingsPage(WebDriver driver) { public AccountSettingsPage(WebDriver driver) {
...@@ -29,7 +29,7 @@ public class AccountSettingsPage { ...@@ -29,7 +29,7 @@ public class AccountSettingsPage {
} }
public WebElement getAccountDropdown() { return driver.findElement(By.linkText("Account")); } public WebElement getAccountDropdown() { return driver.findElement(By.linkText("Account")); }
public WebElement getAccountSettingsButton() { return driver.findElement(By.xpath("//*[@id=\"menu\"]/div[1]/ul/li[4]/a")); } public WebElement getAccountSettingsButton() { return driver.findElement(By.xpath("//*[@id='menu']/div[1]/ul/li[4]/a")); }
public void goToAccountSettings() { public void goToAccountSettings() {
WebDriverWait wait = new WebDriverWait(driver, 5); WebDriverWait wait = new WebDriverWait(driver, 5);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment