You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"
I'm returning to the "intercept my app's Graphql responses" problem, except this time on behalf of a colleague who wants to intercept REST responses where (again) the request url strings are all the same, and the requests differ by what’s in the request body.
... so, I think we should be able to do this by Wait For Response with matcher= a JS function that looks for something in the request body. If the request I'm looking for is the one that has a body
{
"operationName":"sitesSummary",
"variables":{"startTime":1608548953678,"endTime":1608552553678},
"query": <... all the rest of it ...>
}
then I think something close to this ought to work:
${promise}= Promise To Wait For Response matcher= (requestBody) => {requestBody.hasOwnProperty("operationName") && requestBody["operationName"] === "sitesSummary";} timeout=10
It doesn’t – should it? Am I doing something wrong? (It might help if I knew more Javascript than a few hours of going through tutorials)
thanks for any advice! (edited)
The text was updated successfully, but these errors were encountered:
User use case from RF Slack: https://robotframework.slack.com/archives/C015KB1QSDN/p1608553440345200 , inlined here for archiving
"
I'm returning to the "intercept my app's Graphql responses" problem, except this time on behalf of a colleague who wants to intercept REST responses where (again) the request url strings are all the same, and the requests differ by what’s in the request body.
... so, I think we should be able to do this by Wait For Response with matcher= a JS function that looks for something in the request body. If the request I'm looking for is the one that has a body
then I think something close to this ought to work:
It doesn’t – should it? Am I doing something wrong? (It might help if I knew more Javascript than a few hours of going through tutorials)
thanks for any advice! (edited)
The text was updated successfully, but these errors were encountered: