private int skippedComparisons = 0;
@Override
public int differenceFound(Difference difference)
{
NodeDetail expectedNode = difference.getControlNodeDetail();
NodeDetail actualNode = difference.getTestNodeDetail();
String expectedXPath = expectedNode.getXpathLocation();
String actualXPath = actualNode.getXpathLocation();
if (!expectedXPath.equals(actualXPath))
{
return DifferenceListener.RETURN_ACCEPT_DIFFERENCE;
}
String expectedValue = expectedNode.getValue();
expectedValue = expectedValue.replaceAll("\\s+", " ").trim();
String actualValue = actualNode.getValue();
actualValue = actualValue.replaceAll("\\s+", " ").trim();
if (expectedValue.equals(actualValue))
{
return DifferenceListener.RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR;
}