package com.ghost.temple.pages; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class QuestCreator { WebDriver driver; private By addQuestBtnLocator = By.xpath("//a[@href='/equipment']/button[contains(text(),'View All')]"); public QuestCreator(WebDriver driver) { this.driver = driver; } public void clickAddQuest() { WebElement addQuestBtn = driver.findElement(addQuestBtnLocator); addQuestBtn.click(); } }