org.apache.jmeter.assertions.gui

Class XPathPanel


public class XPathPanel
extends JPanel

Constructor Summary

XPathPanel()
XPathPanel(LayoutManager layout)
XPathPanel(LayoutManager layout, boolean isDoubleBuffered)
XPathPanel(boolean isDoubleBuffered)

Method Summary

JButton
getCheckXPathButton()
Check XPath button
JCheckBox
getNegatedCheckBox()
Negated chechbox
String
getXPath()
Get the XPath String
JTextField
getXPathTextField()
boolean
isNegated()
Does this negate the xpath results
boolean
isShowNegated()
void
setDefaultValues()
void
setNegated(boolean negated)
Set this to true, if you want success when the xpath does not match.
void
setShowNegated(boolean showNegate)
void
setXPath(String xpath)
Set the string that will be used in the xpath evaluation
static boolean
validXPath(String xpathString, boolean showDialog)
Test weather an XPath is valid.

Constructor Details

XPathPanel

public XPathPanel()

XPathPanel

public XPathPanel(LayoutManager layout)
Parameters:
layout -

XPathPanel

public XPathPanel(LayoutManager layout,
                  boolean isDoubleBuffered)
Parameters:
layout -
isDoubleBuffered -

XPathPanel

public XPathPanel(boolean isDoubleBuffered)
Parameters:
isDoubleBuffered -

Method Details

getCheckXPathButton

public JButton getCheckXPathButton()
Check XPath button
Returns:
JButton

getNegatedCheckBox

public JCheckBox getNegatedCheckBox()
Negated chechbox
Returns:
JCheckBox

getXPath

public String getXPath()
Get the XPath String
Returns:
String

getXPathTextField

public JTextField getXPathTextField()

isNegated

public boolean isNegated()
Does this negate the xpath results
Returns:
boolean

isShowNegated

public boolean isShowNegated()
Returns:
Returns the showNegate.

setDefaultValues

public void setDefaultValues()

setNegated

public void setNegated(boolean negated)
Set this to true, if you want success when the xpath does not match.
Parameters:
negated -

setShowNegated

public void setShowNegated(boolean showNegate)
Parameters:
showNegate - The showNegate to set.

setXPath

public void setXPath(String xpath)
Set the string that will be used in the xpath evaluation
Parameters:
xpath -

validXPath

public static boolean validXPath(String xpathString,
                                 boolean showDialog)
Test weather an XPath is valid. It seems the Xalan has no easy way to check, so this creates a test document, then tries to evaluate the xpath.
Parameters:
xpathString - XPath String to validate
showDialog - weather to show a dialog
Returns:
returns true if valid, valse otherwise.

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.