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:
https://marketsquare.github.io/robotframework-browser/Browser.html#Extending%20Browser%20library%20with%20a%20JavaScript%20module

Thanks.

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 eyes.open function I need to pass in the page instance.

Hi

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.

Thanks.

1 Like