willtestforfood
13 years agoOccasional Contributor
${#project#endpoint} does not work in script assertion
Using Script Assertion.. how come this code works:
...but this does not?
Everywhere else (so far) I am able to use '${#Project#endpoint} without a problem. The second example above returns null. Thanks!
import com.eviware.soapui.support.XmlHolder
def holder = new XmlHolder( messageExchange.responseContentAsXml )
holder.namespaces["ns1"] = "http://www.example.com/examplepage.htm"
def node = ( holder["//ns1:Response[1]/ns1:RESPONSE[1]"] )
assert node != null
...but this does not?
import com.eviware.soapui.support.XmlHolder
def holder = new XmlHolder( messageExchange.responseContentAsXml )
holder.namespaces["ns1"] = '${#Project#endpoint}/examplepage.htm'
def node = ( holder["//ns1:Response[1]/ns1:RESPONSE[1]"] )
assert node != null
Everywhere else (so far) I am able to use '${#Project#endpoint} without a problem. The second example above returns null. Thanks!