com.atlassian.confluence.selenium.client
Class ConfluenceSeleniumAssertions

java.lang.Object
  extended by com.atlassian.selenium.SeleniumAssertions
      extended by com.atlassian.confluence.selenium.client.ConfluenceSeleniumAssertions

public class ConfluenceSeleniumAssertions
extends com.atlassian.selenium.SeleniumAssertions

Makes assertions specific to Confluence based on page elements such as title, content, error messages, etc.


Constructor Summary
ConfluenceSeleniumAssertions(ConfluenceSeleniumClient client, Confluence confluence)
           
 
Method Summary
 void assertLinkInserted(String linkText, Attachment attachment)
           
 void assertLinkInserted(String linkText, BlogPost blog)
           
 void assertLinkInserted(String linkText, Page page)
           
 void assertLinkInserted(String linkText, String wikiDestination)
           
 void elementDisabled(String selector)
           
 void elementDoesNotHaveClass(String elementId, String className)
           
 void elementHasClass(String elementId, String className)
           
 void elementNotDisabled(String selector)
           
 void elementVisibleWithName(String elementName)
           
 void elementWithXpathContainsText(String locator, String text)
           
 void imagePresent(String imageName)
           
 void infoNotVisible()
           
 void infoVisibleWithText(String text)
          Assert that an Info panel is present on the page and contains the specified text.
 void linkPresentWithTextAndAttributeByTimeout(String linkText, String attributeName, String attributeValue)
          Assert that a link with a given attribute and text is visible by the standard timeout.
 void markupEditorAreaPresent()
          Assert that the wiki markup editor is present (whether or not it's hidden)
 void noteNotVisible()
           
 void noteVisibleWithText(String text)
          Assert that a Note panel is present on the page and contains the specified text.
 void pageTitleEquals(String title)
          Assert that the page title (the Confluence one, not the browser one) contains the specified text.
 void tagContainsText(String tagName, String text)
          Assert that the html tag contains the specified text.
 void urlStringsEqual(String expectedUrl, String actualUrl)
          Asserts that two URLs are equal, taking into account browser-dependent escaping quirks.
 void wikiContentContains(String content)
          Assert that the page content (for a page or blog post) contains the specified text.
 
Methods inherited from class com.atlassian.selenium.SeleniumAssertions
attributeContainsValue, attributeContainsValue, attributeDoesntContainValue, attributeDoesntContainValue, byTimeout, byTimeout, elementContainsText, elementContainsText, elementDoesNotContainText, elementDoesNotContainText, elementDoesntHaveText, elementDoesntHaveText, elementHasText, elementHasText, elementNotPresent, elementNotPresent, elementNotPresentByTimeout, elementNotPresentByTimeout, elementNotPresentByTimeout, elementNotPresentByTimeout, elementNotPresentUntilTimeout, elementNotPresentUntilTimeout, elementNotPresentUntilTimeout, elementNotPresentUntilTimeout, elementNotVisible, elementNotVisible, elementPresent, elementPresent, elementPresentByTimeout, elementPresentByTimeout, elementPresentByTimeout, elementPresentByTimeout, elementPresentUntilTimeout, elementPresentUntilTimeout, elementPresentUntilTimeout, elementPresentUntilTimeout, elementsSameHeight, elementsSameHeight, elementsVerticallyAligned, elementsVerticallyAligned, elementVisible, elementVisible, elementVisibleContainsText, elementVisibleContainsText, formElementEquals, htmlNotPresent, htmlPresent, linkNotPresentWithText, linkPresentWithText, linkVisibleWithText, notVisibleByTimeout, notVisibleByTimeout, notVisibleByTimeout, notVisibleByTimeout, textNotPresent, textNotPresentByTimeout, textNotPresentByTimeout, textPresent, textPresentByTimeout, textPresentByTimeout, untilTimeout, untilTimeout, visibleByTimeout, visibleByTimeout, visibleByTimeout, visibleByTimeout, windowClosed, windowOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfluenceSeleniumAssertions

public ConfluenceSeleniumAssertions(ConfluenceSeleniumClient client,
                                    Confluence confluence)
Method Detail

infoVisibleWithText

public void infoVisibleWithText(String text)
Assert that an Info panel is present on the page and contains the specified text.

Parameters:
text - text to appear in the displayed Info.

infoNotVisible

public void infoNotVisible()

noteVisibleWithText

public void noteVisibleWithText(String text)
Assert that a Note panel is present on the page and contains the specified text.

Parameters:
text - text to appear in the displayed Note.

noteNotVisible

public void noteNotVisible()

imagePresent

public void imagePresent(String imageName)

pageTitleEquals

public void pageTitleEquals(String title)
Assert that the page title (the Confluence one, not the browser one) contains the specified text.

Parameters:
title - page title to appear

wikiContentContains

public void wikiContentContains(String content)
Assert that the page content (for a page or blog post) contains the specified text.


markupEditorAreaPresent

public void markupEditorAreaPresent()
Assert that the wiki markup editor is present (whether or not it's hidden)


elementVisibleWithName

public void elementVisibleWithName(String elementName)

tagContainsText

public void tagContainsText(String tagName,
                            String text)
Assert that the html tag contains the specified text. This method is specifically to assert tag elements in the TinyMCE editor frame as it checks for different tags in Safari.


elementWithXpathContainsText

public void elementWithXpathContainsText(String locator,
                                         String text)

linkPresentWithTextAndAttributeByTimeout

public void linkPresentWithTextAndAttributeByTimeout(String linkText,
                                                     String attributeName,
                                                     String attributeValue)
Assert that a link with a given attribute and text is visible by the standard timeout.

See Also:
SeleniumAssertions.visibleByTimeout(String)

elementHasClass

public void elementHasClass(String elementId,
                            String className)

elementDoesNotHaveClass

public void elementDoesNotHaveClass(String elementId,
                                    String className)

elementDisabled

public void elementDisabled(String selector)

elementNotDisabled

public void elementNotDisabled(String selector)

urlStringsEqual

public void urlStringsEqual(String expectedUrl,
                            String actualUrl)
Asserts that two URLs are equal, taking into account browser-dependent escaping quirks.


assertLinkInserted

public void assertLinkInserted(String linkText,
                               BlogPost blog)

assertLinkInserted

public void assertLinkInserted(String linkText,
                               Attachment attachment)

assertLinkInserted

public void assertLinkInserted(String linkText,
                               Page page)

assertLinkInserted

public void assertLinkInserted(String linkText,
                               String wikiDestination)


Copyright © 2003-2010 Atlassian. All Rights Reserved.