-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Context:
- Playwright Version: 1.22
- Operating System: Linux
- Python version: 3.8.0
- Browser: n/a
- Extra: n/a
Code Snippet
from playwright.async_api import FrameLocator, Page
def locate_my_iframe(page: Page) -> FrameLocator:
return page.frame_locator('some_complex_selector')
Describe the bug
Because the FrameLocator
type isn't exported from playwright.async_api
(nor from sync_api
), I can't use it as the type of a return value or function parameter. The code above fails Mypy with the error Module 'playwright.async_api' has no attribute 'FrameLocator' [attr-defined]
.
FrameLocator is a documented part of the API, so it seems like it should be exported.
Metadata
Metadata
Assignees
Labels
No labels