def responseDB =groovyUtils.getXmlHolder("WeightingCheck#ResponseAsXml")
def xmlUtil = new com.eviware.soapui.support.xml.XmlUtils();
def DBnodes = responseDB.getDomNodes( "//*" );
for( node in DBnodes ){
def DBvalue = com.eviware.soapui.support.xml.XmlUtils.getNodeValue( node )
log.info node.getNodeName()
log.info DBvalue
}
//import com.eviware.soapui.support.xmlHolder
//import groovy.util.XmlParser
def response3X = context.expand('${Get3XList#response}')
def responseCloud = context.expand('${GetCloudList#response}')
def ArrayList list = new ArrayList();
//assert response3X.contains(responseCloud)
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def request3X = groovyUtils.getXmlHolder(response3X)
def requestCloud = groovyUtils.getXmlHolder(responseCloud)
//get Node Values
def ths3X = request3X.getNodeValues("//thead/tr/th")
def thsCloud = requestCloud.getNodeValues('//thead/tr/th')
def tds3X = request3X.getNodeValues("//tbody/tr/td")
def tdsCloud = requestCloud.getNodeValues('//tbody/tr/td')
def count1s = thsCloud.size()
def count2s = tdsCloud.size()
//Compare with each other
for (i=0;i<count1s;i++){
if (thsCloud[i]==ths3X[i])
log.info "data convent data point successfully"
else
log.info " the Cloud is" + thsCloud[i] +" ths3X is" + ths3X[i]
}
for(def j=1; j<count2s;j++){ //check the value of the data points
if (tdsCloud[j]==tds3X[j]){
//log.info '"' + ths3X[j%count1s]+'"'+ " data value convent successfully"
list.add(ths3X[j%count1s]) //add the successfully data points to the list
}
else{
log.info "data value convent Failed, the 3x data point is: " + ths3X[j%count1s]
//log.info "3X is: " + tds3X[j] +" cloud is: "+ tdsCloud[j]
// list.add(ths3X[j%count1s]) //add the failed data points to the list
}
HashSet h =new HashSet(list) / / remove the duplicate data points form the list
list.clear()
list.addAll(h)
}