com.atlassian.confluence.it
Class ResponseXPath

java.lang.Object
  extended by com.atlassian.confluence.it.ResponseXPath

public class ResponseXPath
extends java.lang.Object

Lets you call the WebTester XPath functions without throwing assertion failed errors.


Method Summary
 java.lang.String getElementAttributeValue(java.lang.String attribute)
          Returns the value of an attribute on an element in the current response stored in the WebTester.
static java.lang.String getElementAttributeValue(java.lang.String elementXPath, java.lang.String attribute)
          Deprecated. 
static java.lang.String getElementAttributeValue(java.lang.String elementXPath, java.lang.String attribute, net.sourceforge.jwebunit.junit.WebTester webTester)
          Deprecated. 
 java.lang.String getElementText()
          Returns the inner text of an element in the current response stored in the WebTester.
static java.lang.String getElementText(java.lang.String elementXPath)
          Deprecated. 
static java.lang.String getElementText(java.lang.String elementXPath, net.sourceforge.jwebunit.junit.WebTester webTester)
          Deprecated. 
 boolean hasElement()
          Returns true if an element in the current response stored in the WebTester matches the given xpath, otherwise returns false.
static boolean hasElement(java.lang.String elementXPath)
          Deprecated. 
static boolean hasElement(java.lang.String elementXPath, net.sourceforge.jwebunit.junit.WebTester webTester)
          Deprecated. 
static ResponseXPath responseXPath(java.lang.String elementXPath)
           
static ResponseXPath responseXPath(net.sourceforge.jwebunit.junit.WebTester webTester, java.lang.String elementXPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getElementAttributeValue

@Deprecated
public static java.lang.String getElementAttributeValue(java.lang.String elementXPath,
                                                                   java.lang.String attribute)
Deprecated. 


getElementAttributeValue

@Deprecated
public static java.lang.String getElementAttributeValue(java.lang.String elementXPath,
                                                                   java.lang.String attribute,
                                                                   net.sourceforge.jwebunit.junit.WebTester webTester)
Deprecated. 


getElementText

@Deprecated
public static java.lang.String getElementText(java.lang.String elementXPath)
Deprecated. 


getElementText

@Deprecated
public static java.lang.String getElementText(java.lang.String elementXPath,
                                                         net.sourceforge.jwebunit.junit.WebTester webTester)
Deprecated. 


hasElement

@Deprecated
public static boolean hasElement(java.lang.String elementXPath)
Deprecated. 


hasElement

@Deprecated
public static boolean hasElement(java.lang.String elementXPath,
                                            net.sourceforge.jwebunit.junit.WebTester webTester)
Deprecated. 


responseXPath

public static ResponseXPath responseXPath(java.lang.String elementXPath)

responseXPath

public static ResponseXPath responseXPath(net.sourceforge.jwebunit.junit.WebTester webTester,
                                          java.lang.String elementXPath)

hasElement

public boolean hasElement()
Returns true if an element in the current response stored in the WebTester matches the given xpath, otherwise returns false.

Returns:
true if an element with the given xpath exists, otherwise false

getElementText

public java.lang.String getElementText()
Returns the inner text of an element in the current response stored in the WebTester. The element used is the first element specified by executing the xpath expression against the response document. Returns null if either the element does not exist.

Returns:
the text inside the first element specified by the xpath expression

getElementAttributeValue

public java.lang.String getElementAttributeValue(java.lang.String attribute)
Returns the value of an attribute on an element in the current response stored in the WebTester. The element used is the first element specified by executing the xpath expression against the response document. Returns null if either the element or attribute does not exist.

Parameters:
attribute - the name of the attribute whose value will be returned
Returns:
the value of the given attribute on the first element specified by the xpath expression


Copyright © 2003-2014 Atlassian. All Rights Reserved.