grub
16 years agoOccasional Contributor
XPath assertion with wildcards
Hello ,
In an xpath assertion , after I get the expected result via select from current , and replace some value with wildcard , then the test fails .
This is my xpath assertion :
Declare :
//ns1:getCampaignItemOverviewResponse/getCampaignItemOverviewReturn/ciid[.='${Properties: Test Case Generated Settings#draft campaign -> campaign item 1 id}']/../extra/
item/key[.='unsubscribed']/../value/item/key[.='nr']/../value
Result: select from current :
0
That is ok , but now, I want to replace the constant value ( in this case 0 ) in expected result with a wildcard * and using 'allow wildcards' , but then it says
XPathContains assertion failed for path [declare namespace soap='http://schemas.xmlsoap.org/soap/envelope/'; declare namespace ns1='urn:addemar'; declare namespace addemar='http://schemas.xmlsoap.org/wsdl/'; //ns1:getCampaignItemOverviewResponse/getCampaignItemOverviewReturn/ciid[.='${Properties: Test Case Generated Settings#draft campaign -> campaign item 1 id}']/../extra/ item/key[.='unsubscribed']/../value/item/key[.='nr']/../value] : XmlValueDisconnectedException:null
kind regards
In an xpath assertion , after I get the expected result via select from current , and replace some value with wildcard , then the test fails .
This is my xpath assertion :
Declare :
//ns1:getCampaignItemOverviewResponse/getCampaignItemOverviewReturn/ciid[.='${Properties: Test Case Generated Settings#draft campaign -> campaign item 1 id}']/../extra/
item/key[.='unsubscribed']/../value/item/key[.='nr']/../value
Result: select from current :
That is ok , but now, I want to replace the constant value ( in this case 0 ) in expected result with a wildcard * and using 'allow wildcards' , but then it says
XPathContains assertion failed for path [declare namespace soap='http://schemas.xmlsoap.org/soap/envelope/'; declare namespace ns1='urn:addemar'; declare namespace addemar='http://schemas.xmlsoap.org/wsdl/'; //ns1:getCampaignItemOverviewResponse/getCampaignItemOverviewReturn/ciid[.='${Properties: Test Case Generated Settings#draft campaign -> campaign item 1 id}']/../extra/ item/key[.='unsubscribed']/../value/item/key[.='nr']/../value] : XmlValueDisconnectedException:null
kind regards