PageRenderTime 51ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/src/main/java/pageobjects/ProjectSummaryPage.java

https://bitbucket.org/farmas/studio-workflow-tester
Java | 46 lines | 29 code | 12 blank | 5 comment | 0 complexity | d57a6becca0d5d1d4ceaf9740f339215 MD5 | raw file
  1. package pageobjects;
  2. import com.atlassian.pageobjects.Page;
  3. import com.atlassian.pageobjects.binder.WaitUntil;
  4. import com.atlassian.pageobjects.elements.ElementBy;
  5. import com.atlassian.pageobjects.elements.PageElement;
  6. import com.atlassian.pageobjects.elements.PageElementFinder;
  7. import com.atlassian.pageobjects.elements.query.Poller;
  8. import org.openqa.selenium.By;
  9. import javax.inject.Inject;
  10. /**
  11. * TODO: Document this class / interface here
  12. *
  13. * @since v4.3
  14. */
  15. public class ProjectSummaryPage implements Page {
  16. @Inject
  17. PageElementFinder finder;
  18. @ElementBy(id="project-config-details-project-key")
  19. PageElement projectDetailsSpan;
  20. private final String key;
  21. public ProjectSummaryPage(String key){
  22. this.key = key;
  23. }
  24. @WaitUntil
  25. private void waitUntil(){
  26. Poller.waitUntilTrue(projectDetailsSpan.timed().isVisible());
  27. }
  28. public String getUrl() {
  29. return "/plugins/servlet/project-config/"+ key + "/summary";
  30. }
  31. public String getId(){
  32. return projectDetailsSpan.getAttribute("data-pid");
  33. }
  34. }