You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Expose page instance from locator #11269
Let us know what functionality you'd like to see in Playwright and what your use case is.
Do you think others might benefit from this as well?
My use case are page fragments that receive root locator from the main page, and use it as a reference point for further element interactions. And sometimes I need an instance of the page used to define the root locator. So it would be a bit easier to get the instance from the locator, than passing it as additional constructor argument.
I built a page object framework built on top of locators that currently is using the _frame property since it is not publicly exposed, so I could benefit from this as well.
Activity
mskelton commentedon Jan 15, 2022
I built a page object framework built on top of locators that currently is using the
_frameproperty since it is not publicly exposed, so I could benefit from this as well.https://github.com/Widen/lariat/blob/main/src/Collection.ts#L85-L87