Getting the Page Instance

I need to get the playwright.sync_api.Page instance that is being used by Browser so that I can pass this to an SDK and create my own custom Keyword that I am trying to incorporate into my code.

Is there any way of doing this or is it on the roadmap?

Take a look at extending Browser library with javascript module:


I already have created Keywords extending the library with javascript module however the latest thing I am working on is Playwright Python SDK by Applitools.

For the function I need to pass in the page instance.


The browser, context and page live only in NodeJS side and Browser library doesn’t have objects exposed in Python land.

If Applitool has API in nodeJS side, that could be an option for you.

Thank you!

I already had this implemented and had just been hoping to consolidate everything in python.

This is great information to know.


1 Like