Pass multiple parameters in the SendRequest call

Hi,

I have a situation where I would like to pass more than 1 parameter in the SendRequest request.Can I confirm if we cannot send more than one global variable in this format?

My scenario is Cookies which goes into header as Variable 1 and then in Body again I have another value which can be replaced by a global variable.

So essentially my request in the test case looks like this:

responseData = WS.sendRequest(findTestObject(‘API requests/Get case’, [(‘Cookie’) : GlobalVariable.CookieV],[(‘value’) : GlobalVariable.Research]))

WHERE GlobalVariable.Research] is SET AS =Library-+Research+Consultation
In Fiddler my captured Request has following under WebForms:
FetchXml=

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"><entity name="incident"><attribute name="title"/><attribute name="ticketnumber"/><attribute name="createdon"/><attribute name="caseorigincode"/><attribute name="incidentid"/><attribute name="customerid"/><order attribute="title" descending="false"/><filter type="and"><condition attribute="customerid" operator="eq" uiname="Prashant Rajan" uitype="contact" value="{164074AB-963B-E811-8145-E0071B66A541}"/><condition attribute="title" operator="like" value="%Library- Research Consultation%"/></filter></entity></fetch>

**I am trying to parametrise "value"  tag so that I can replace it with different form names from my test cases.Here tag values are encvlosed in DOUBLE QUOTEs in contrast to yuor example on the website(So a bit confused as well how to go about)

But On Running I get following error:

04-30-2018 03:51:50 PM - [ERROR] - Test Cases/UNSW CRM/Library forms/View created case FAILED because (of) groovy.lang.MissingMethodException: No signature of method: Script1524806035762.findTestObject() is applicable for argument types: (java.lang.String, java.util.LinkedHashMap, java.util.LinkedHashMap) values: [API requests/Get case, [Cookie:ReqClientId=38e7f271-28fb-4852-90c5-d26b3782f8a5; MSCRM_UILanguage=1033; crmf5cookie=!5EuCRGQW9UuU5YF8eVav5kDitsw+oZfBIPJOsBPrepWa7V+Wuow2jXNdfWKt12lII1BnEtichpBvcw==; MSISSignOut=; MSISAuth=77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48U2VjdXJpdHlDb250ZXh0VG9rZW4gcDE6SWQ9Il9hOWYzNmUyMy0xODJkLTRkNjQtYTE1Yi00OGFhM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cFJjUVZqS2dEVTNIPC9Db29raWU+PC9TZWN1cml0eUNvbnRleHRUb2tlbj4=; MSCRM_OrgId=b23b6186-19dc-433f-a8df-cc370d1f1f7e], …]

Your help will be great in resolving this.

prashant,

I think there is a typo in your parameters setup:
responseData = WS.sendRequest(findTestObject(‘API requests/Get case’, [(‘Cookie’) : GlobalVariable.CookieV],[(‘value’) : GlobalVariable.Research]))

Could you try following configuration:
[(‘Cookie’) : GlobalVariable.CookieV, (‘value’) : GlobalVariable.Research]

2 Likes

Thanks Team for the answer