MarketSquare / MarketSquare/robotframework-browser
Improve documentation and test coverage for complicated request waits and captures
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 655
- Forks
- 147
- Avg merge
- 5h 38m
- Merged PRs (30d)
- 58
Description
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
{
"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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Wait For Response entry point and reproduce the request-body matcher example from the issue. Read the existing documentation and tests for request waits and captures; done means the supported behavior is clearly documented and coverage verifies matching requests whose bodies differ while their URLs are identical.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, playwright, python
- Domain
- documentation, testing-qa
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100