Forum Discussion

maria_vst's avatar
maria_vst
Contributor
7 years ago

How to provide an object from third party components to TestExecute REST API?

Hello. I'm trying to communicate with TestExecute API. When executing GET/POST requests with parameters simple data types everything is Ok. But there are some methods from third party components...
  • maria_vst's avatar
    maria_vst
    6 years ago

    Hello,

    If someone is interested in this, that is the way to resolve my issue:
    methodName = "LocateByDisplayText";
                request = new RestRequest("1/sys/" + mainViewId + "/method/" + methodName, Method.GET);
                request.AddParameter("arg1", 0); 
                request.AddParameter("arg2", request.JsonSerializer.Serialize(new { id = gridColumnId })); // Making a JSON based on the GridColumn id
                request.AddParameter("arg3", "\"Nissan\"");
                response = restClient.Execute(request);

    Regards,
    Maria