MarketSquare / MarketSquare/robotframework-browser
Intercepting and modifying responses (playwright page.route)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 655
- Forks
- 147
- Avg merge
- 5h 27m
- Merged PRs (30d)
- 59
Description
**Modifying responses**
As a tester I need to _intercept and modify response to a request_,
so that I can _mock various error states_ handling on UI.
(eg.: How will application frontend handle error state 500? - it should show specific message to user, but in fully working application it is not easy to cause backend to fail)
**Solution: New `Page Route` keyword**
Based on playwright [documentation](https://playwright.dev/#version=v1.4.2&path=docs%2Fnetwork.md&q=network) it should be possible to intercept and modify HTTP and HTTPS requests/responses.
Playwright-python: page.route : [Documentation](https://github.com/microsoft/playwright-python#intercept-network-requests)
Playwright [page.route](https://playwright.dev/#version=v1.4.2&path=docs%2Fapi.md&q=pagerouteurl-handler) for this.
This would be of great value for testing.
Thanks a lot for considering this,
regards,
Jan.
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 by reviewing the existing Robot Framework Browser keyword entry points and the Playwright page.route documentation linked in the issue. Trace how browser actions are exposed and tested, then verify that a routed response can be modified to produce a mocked HTTP 500 error and that the resulting UI behavior is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100