com.atlassian.confluence.pageobjects
Class ConfluenceTestedProduct

java.lang.Object
  extended by com.atlassian.confluence.pageobjects.ConfluenceTestedProduct
All Implemented Interfaces:
com.atlassian.pageobjects.TestedProduct<com.atlassian.webdriver.pageobjects.WebDriverTester>

public class ConfluenceTestedProduct
extends Object
implements com.atlassian.pageobjects.TestedProduct<com.atlassian.webdriver.pageobjects.WebDriverTester>


Nested Class Summary
static class ConfluenceTestedProduct.LoginType
           
 
Constructor Summary
ConfluenceTestedProduct(com.atlassian.pageobjects.TestedProductFactory.TesterFactory<com.atlassian.webdriver.pageobjects.WebDriverTester> testerFactory, com.atlassian.pageobjects.ProductInstance productInstance)
           
ConfluenceTestedProduct(com.atlassian.pageobjects.TestedProductFactory.TesterFactory<com.atlassian.webdriver.pageobjects.WebDriverTester> testerFactory, com.atlassian.pageobjects.ProductInstance productInstance, ConfluenceTestedProduct.LoginType loginType)
           
 
Method Summary
<M extends com.atlassian.pageobjects.Page>
M
autoLoginEmbeddingCredentialsInUrl(User user, Class<M> destinationClass, Object... args)
          Faster way of login when in testing environment by embedding the credentials in the url, so we don't have to visit the login page every single time.
 void clearLocalStorage()
           
 void deleteAllCookies()
           
 void deleteCookieNamed(String name)
           
 org.openqa.selenium.Cookie getCookieNamed(String name)
           
 com.atlassian.pageobjects.PageBinder getPageBinder()
           
 com.atlassian.pageobjects.ProductInstance getProductInstance()
           
 com.atlassian.webdriver.pageobjects.WebDriverTester getTester()
           
 ConfluenceAdminHomePage gotoAdminHomePage()
           
 DashboardPage gotoHomePage()
           
 ConfluenceLoginPage gotoLoginPage()
           
 Boolean isCookiePresent(String name)
           
<M extends com.atlassian.pageobjects.Page>
M
login(User user, Class<M> destination, Object... args)
           
 CopyPage loginAndCopyPage(User user, Page page)
           
 CreateBlog loginAndCreateBlog(User user, Space space)
           
 CreatePage loginAndCreatePage(User user, Space space)
           
 CreatePageTemplate loginAndCreatePageTemplate(User user, Space space)
           
 EditContentPage loginAndEdit(User user, BlogPost blog)
           
 EditContentPage loginAndEdit(User user, Draft draft)
           
 EditContentPage loginAndEdit(User user, Page page)
           
 EditRestrictedPage loginAndEditRestricted(User user, AbstractPageEntity page)
           
 ViewPage loginAndView(User user, BlogPost blogPost)
           
 ViewPage loginAndView(User user, Page page)
           
 ViewRestrictedPage loginAndViewRestricted(User user, AbstractPageEntity page)
           
 LogoutPage logOut()
           
 void logOutFast()
           
 ConfluenceTestedProduct refresh()
          Make the underlying driver refresh the current page, e.g.
 ViewPage viewPage(String pageId)
           
 PageInfo viewPageInfo(long pageId)
           
<P extends com.atlassian.pageobjects.Page>
P
visit(Class<P> pageClass, Object... args)
           
<P extends com.atlassian.pageobjects.Page>
P
visitExternal(Class<P> pageClass, Object... args)
           
 com.atlassian.pageobjects.page.LoginPage visitPageExpectingLogin(Class<? extends com.atlassian.pageobjects.Page> destination, Object... args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfluenceTestedProduct

public ConfluenceTestedProduct(com.atlassian.pageobjects.TestedProductFactory.TesterFactory<com.atlassian.webdriver.pageobjects.WebDriverTester> testerFactory,
                               com.atlassian.pageobjects.ProductInstance productInstance)

ConfluenceTestedProduct

public ConfluenceTestedProduct(com.atlassian.pageobjects.TestedProductFactory.TesterFactory<com.atlassian.webdriver.pageobjects.WebDriverTester> testerFactory,
                               com.atlassian.pageobjects.ProductInstance productInstance,
                               ConfluenceTestedProduct.LoginType loginType)
Method Detail

gotoHomePage

public DashboardPage gotoHomePage()

visitPageExpectingLogin

public com.atlassian.pageobjects.page.LoginPage visitPageExpectingLogin(Class<? extends com.atlassian.pageobjects.Page> destination,
                                                                        Object... args)

gotoAdminHomePage

public ConfluenceAdminHomePage gotoAdminHomePage()

gotoLoginPage

public ConfluenceLoginPage gotoLoginPage()

login

public <M extends com.atlassian.pageobjects.Page> M login(User user,
                                                          Class<M> destination,
                                                          Object... args)

autoLoginEmbeddingCredentialsInUrl

public <M extends com.atlassian.pageobjects.Page> M autoLoginEmbeddingCredentialsInUrl(User user,
                                                                                       Class<M> destinationClass,
                                                                                       Object... args)
Faster way of login when in testing environment by embedding the credentials in the url, so we don't have to visit the login page every single time.


loginAndEdit

public EditContentPage loginAndEdit(User user,
                                    BlogPost blog)

loginAndEdit

public EditContentPage loginAndEdit(User user,
                                    Draft draft)

loginAndEdit

public EditContentPage loginAndEdit(User user,
                                    Page page)

loginAndCreatePage

public CreatePage loginAndCreatePage(User user,
                                     Space space)

loginAndCreatePageTemplate

public CreatePageTemplate loginAndCreatePageTemplate(User user,
                                                     Space space)

loginAndCopyPage

public CopyPage loginAndCopyPage(User user,
                                 Page page)

loginAndCreateBlog

public CreateBlog loginAndCreateBlog(User user,
                                     Space space)

loginAndView

public ViewPage loginAndView(User user,
                             Page page)

loginAndView

public ViewPage loginAndView(User user,
                             BlogPost blogPost)

logOut

public LogoutPage logOut()

logOutFast

public void logOutFast()

deleteAllCookies

public void deleteAllCookies()

deleteCookieNamed

public void deleteCookieNamed(String name)

getCookieNamed

public org.openqa.selenium.Cookie getCookieNamed(String name)

isCookiePresent

public Boolean isCookiePresent(String name)

clearLocalStorage

public void clearLocalStorage()

visitExternal

public <P extends com.atlassian.pageobjects.Page> P visitExternal(Class<P> pageClass,
                                                                  Object... args)

visit

public <P extends com.atlassian.pageobjects.Page> P visit(Class<P> pageClass,
                                                          Object... args)
Specified by:
visit in interface com.atlassian.pageobjects.TestedProduct<com.atlassian.webdriver.pageobjects.WebDriverTester>

viewPageInfo

public PageInfo viewPageInfo(long pageId)

viewPage

public ViewPage viewPage(String pageId)

loginAndViewRestricted

public ViewRestrictedPage loginAndViewRestricted(User user,
                                                 AbstractPageEntity page)

loginAndEditRestricted

public EditRestrictedPage loginAndEditRestricted(User user,
                                                 AbstractPageEntity page)

getPageBinder

public com.atlassian.pageobjects.PageBinder getPageBinder()
Specified by:
getPageBinder in interface com.atlassian.pageobjects.TestedProduct<com.atlassian.webdriver.pageobjects.WebDriverTester>

getProductInstance

public com.atlassian.pageobjects.ProductInstance getProductInstance()
Specified by:
getProductInstance in interface com.atlassian.pageobjects.TestedProduct<com.atlassian.webdriver.pageobjects.WebDriverTester>

getTester

public com.atlassian.webdriver.pageobjects.WebDriverTester getTester()
Specified by:
getTester in interface com.atlassian.pageobjects.TestedProduct<com.atlassian.webdriver.pageobjects.WebDriverTester>

refresh

public ConfluenceTestedProduct refresh()
Make the underlying driver refresh the current page, e.g. you change some config over XML-RPC.

Be aware that all your WebElements become stale, so make sure you either use PageElements or re-locate them after calling this method.

See Also:
ElementBy, PageElementFinder


Copyright © 2003–2015 Atlassian. All rights reserved.