/src/main/java/pageobjects/ProjectSummaryPage.java
Java | 46 lines | 29 code | 12 blank | 5 comment | 0 complexity | d57a6becca0d5d1d4ceaf9740f339215 MD5 | raw file
- package pageobjects;
-
-
- import com.atlassian.pageobjects.Page;
- import com.atlassian.pageobjects.binder.WaitUntil;
- import com.atlassian.pageobjects.elements.ElementBy;
- import com.atlassian.pageobjects.elements.PageElement;
- import com.atlassian.pageobjects.elements.PageElementFinder;
- import com.atlassian.pageobjects.elements.query.Poller;
- import org.openqa.selenium.By;
-
- import javax.inject.Inject;
-
- /**
- * TODO: Document this class / interface here
- *
- * @since v4.3
- */
- public class ProjectSummaryPage implements Page {
-
- @Inject
- PageElementFinder finder;
-
- @ElementBy(id="project-config-details-project-key")
- PageElement projectDetailsSpan;
-
- private final String key;
-
-
- public ProjectSummaryPage(String key){
- this.key = key;
- }
-
- @WaitUntil
- private void waitUntil(){
- Poller.waitUntilTrue(projectDetailsSpan.timed().isVisible());
- }
-
- public String getUrl() {
- return "/plugins/servlet/project-config/"+ key + "/summary";
- }
-
- public String getId(){
- return projectDetailsSpan.getAttribute("data-pid");
- }
- }