HTTP Request Intercepts

Hi Robot Community,

Greetings! Was redirected here from Github issue I raised so thought I’d ask my questions on my doubt regarding HTTP request intercepts.

In robot framework, methods similar to Cypress intercepts (cy.intercept().as('alias') then cy.get(@alias)) do not exist as I have been told.

I was advised that these should exist in libraries (github question issue I raised: (QUESTION): HTTP request intercepts · Issue #5349 · robotframework/robotframework · GitHub)

I have tried the playwright library however, even after setting it up correctly, it does not intercept the right request or response I’m looking for even after passing a correct matcher.

Additionally, I see its setup quite complex and not something that will work with how our CI/CD is currently running (we are building our app within podman, then run robot against that local environment)

Are there no alternative within existing BuiltIn libraries which do this?

Thought I’d reach out and see if anyone had found a solution for this.

Any help / guidance you can give would be highly appreciated!

Thank you!


Robot version: Robot Framework 7.1.1 (Python 3.9.16 on linux)
OS:

  • Distributor ID: Ubuntu
  • Description: Ubuntu 24.04.2 LTS
  • Release: 24.04 (noble)

browser library doesn’t have that feature out of the box but you need to provide that feature with a plugin. Either whip up your own or use this; robotframework-browser-extensions/mockUrl at main · MarketSquare/robotframework-browser-extensions · GitHub

and if seeing issues, file issue there or ping me here.

3 Likes