Forum Discussion

pandiyarajk's avatar
pandiyarajk
New Contributor
11 years ago

Xpath issue when running tests from maven

Hi,

I am using below scripts to assert xpath value.

import com.eviware.soapui.support.XmlHolder
def Teststep = <targetTestRequestStepName>
def ExpectedContent=”Closed”
def Status =""
def Actual =""
def Type=="Response"
def Expression = “declare namespace cla='http://test.integration.claims/ClaimUpdateResponse-v1';//cla:ClaimUpdateResponse[1]/cla:claim_status[1]”
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( "$Teststep#$Type" )
Actual = holder.getNodeValue(Expression)
if(Actual==ExpectedContent)
Status = "Pass"
else
Status = "Fail"

On executing the tests using Maven, I am getting below error,

ERROR [log] java.lang.ClassCastException: org.apache.xmlbeans.impl.
xpath.saxon.XBeansXPath cannot be cast to org.apache.xmlbeans.impl.store.SaxonXB
eansDelegate$SelectPathInterface


Could you please help me to solve this issue?

Thanks in Advance,
Pandi

3 Replies