Your XML has an element of which name contains a dot character (.)
A dot character (.) is valid to be a part of XML Name. It is OK. The spec allows it. But ordinary people rarely use a dot in XML element name. In this sence, your target XML is unusual.
On the other hand, the Katalon keyword uses a notation like GPath. They named it as locator. The documentation gives an example of locator, like
'PreAuthorizeResponse.Receipt.TransactionResult'
You should note that all dot characters ( . ) in a locator stands for the boundary of XML elements. This locator correcponds to the target XML like:
<env:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<ns:PreAuthorizeResponse xmlns:ns="beep" xmlns:ns2="bop" xmlns:ns1="foo" >
<ns:Receipt>
<ns1:DataKey>123</ns1:DataKey>
<ns1:CustomerId>12345</ns1:CustomerId>
<ns1:PaymentId>123456</ns1:PaymentId>
<ns1:TransactionResult>Approved</ns1:TransactionResult>
...
Now, you should note that the locator syntax implicitly assumes that the target XML document has NO elements that contain dot characters in the element name.
Now let me review your case.
Your code
WS.verifyElementText(response, ‘GenWs03ConsultadeDeudaCC.ExecuteResponse.Buenpaga’, ‘S’)
This expects a XML element structure to be something like this:
...
<GenWs03ConsultadeDeudaCC>
<ExecuteResponse>
<Buenpaga>S</Buenpaga>
...
This structure is different from your target XML actually is. Therefore, Katalon’s keyword WS.verifyElementText(response, locator, expectedValue)
can NEVER be correct against your target XML which uses a dot character (.) in the Name.
Any workaround? — You can not rely on WS.xxx keywords. So you need to write a tons of XML processing in Groovy. You would want to start learning the doc
http://groovy-lang.org/processing-xml.html
and develop an art. You have to avoid the friendly “GPath” features. Possibly you would want to use XPath 1.0 paying enough attention to XML Namespace. I am afraid, this would be a difficult objective. I can not give you a quick and easy answer (as there is none).
My conclusion: Your target XML is unusual. It’s too difficult to process using WS.* keywords. You had better abandun your objective in Katalon Studio.