Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions playwright/async_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5840,6 +5840,7 @@ async def newContext(
colorScheme: Literal["dark", "light", "no-preference"] = None,
acceptDownloads: bool = None,
defaultBrowserType: str = None,
proxy: ProxyServer = None,
videosPath: str = None,
videoSize: IntSize = None,
recordHar: RecordHarOptions = None,
Expand Down Expand Up @@ -5883,6 +5884,8 @@ async def newContext(
Emulates `'prefers-colors-scheme'` media feature, supported values are `'light'`, `'dark'`, `'no-preference'`. See page.emulateMedia(options) for more details. Defaults to '`light`'.
acceptDownloads : Optional[bool]
Whether to automatically download all the attachments. Defaults to `false` where all the downloads are canceled.
proxy : Optional[{"server": str, "bypass": Optional[str], "username": Optional[str], "password": Optional[str]}]
Network proxy settings to use with this context. Note that browser needs to be launched with the global proxy for this option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example `launch({ proxy: { server: 'per-proxy' } })`.
videosPath : Optional[str]
Enables video recording for all pages to `videosPath` folder. If not specified, videos are not recorded. Make sure to await `browserContext.close` for videos to be saved.
videoSize : Optional[{"width": int, "height": int}]
Expand Down Expand Up @@ -5914,6 +5917,7 @@ async def newContext(
colorScheme=colorScheme,
acceptDownloads=acceptDownloads,
defaultBrowserType=defaultBrowserType,
proxy=proxy,
videosPath=videosPath,
videoSize=videoSize,
recordHar=recordHar,
Expand All @@ -5940,6 +5944,7 @@ async def newPage(
colorScheme: Literal["dark", "light", "no-preference"] = None,
acceptDownloads: bool = None,
defaultBrowserType: str = None,
proxy: ProxyServer = None,
videosPath: str = None,
videoSize: IntSize = None,
recordHar: RecordHarOptions = None,
Expand Down Expand Up @@ -5984,6 +5989,8 @@ async def newPage(
Emulates `'prefers-colors-scheme'` media feature, supported values are `'light'`, `'dark'`, `'no-preference'`. See page.emulateMedia(options) for more details. Defaults to '`light`'.
acceptDownloads : Optional[bool]
Whether to automatically download all the attachments. Defaults to `false` where all the downloads are canceled.
proxy : Optional[{"server": str, "bypass": Optional[str], "username": Optional[str], "password": Optional[str]}]
Network proxy settings to use with this context. Note that browser needs to be launched with the global proxy for this option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example `launch({ proxy: { server: 'per-proxy' } })`.
videosPath : Optional[str]
Enables video recording for all pages to `videosPath` folder. If not specified, videos are not recorded. Make sure to await `page.close` for videos to be saved.
videoSize : Optional[{"width": int, "height": int}]
Expand Down Expand Up @@ -6015,6 +6022,7 @@ async def newPage(
colorScheme=colorScheme,
acceptDownloads=acceptDownloads,
defaultBrowserType=defaultBrowserType,
proxy=proxy,
videosPath=videosPath,
videoSize=videoSize,
recordHar=recordHar,
Expand Down
3 changes: 3 additions & 0 deletions playwright/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
Credentials,
Geolocation,
IntSize,
ProxyServer,
RecordHarOptions,
locals_to_params,
)
Expand Down Expand Up @@ -87,6 +88,7 @@ async def newContext(
colorScheme: ColorScheme = None,
acceptDownloads: bool = None,
defaultBrowserType: str = None,
proxy: ProxyServer = None,
videosPath: str = None,
videoSize: IntSize = None,
recordHar: RecordHarOptions = None,
Expand Down Expand Up @@ -128,6 +130,7 @@ async def newPage(
colorScheme: ColorScheme = None,
acceptDownloads: bool = None,
defaultBrowserType: str = None,
proxy: ProxyServer = None,
videosPath: str = None,
videoSize: IntSize = None,
recordHar: RecordHarOptions = None,
Expand Down
8 changes: 8 additions & 0 deletions playwright/sync_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6076,6 +6076,7 @@ def newContext(
colorScheme: Literal["dark", "light", "no-preference"] = None,
acceptDownloads: bool = None,
defaultBrowserType: str = None,
proxy: ProxyServer = None,
videosPath: str = None,
videoSize: IntSize = None,
recordHar: RecordHarOptions = None,
Expand Down Expand Up @@ -6119,6 +6120,8 @@ def newContext(
Emulates `'prefers-colors-scheme'` media feature, supported values are `'light'`, `'dark'`, `'no-preference'`. See page.emulateMedia(options) for more details. Defaults to '`light`'.
acceptDownloads : Optional[bool]
Whether to automatically download all the attachments. Defaults to `false` where all the downloads are canceled.
proxy : Optional[{"server": str, "bypass": Optional[str], "username": Optional[str], "password": Optional[str]}]
Network proxy settings to use with this context. Note that browser needs to be launched with the global proxy for this option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example `launch({ proxy: { server: 'per-proxy' } })`.
videosPath : Optional[str]
Enables video recording for all pages to `videosPath` folder. If not specified, videos are not recorded. Make sure to await `browserContext.close` for videos to be saved.
videoSize : Optional[{"width": int, "height": int}]
Expand Down Expand Up @@ -6151,6 +6154,7 @@ def newContext(
colorScheme=colorScheme,
acceptDownloads=acceptDownloads,
defaultBrowserType=defaultBrowserType,
proxy=proxy,
videosPath=videosPath,
videoSize=videoSize,
recordHar=recordHar,
Expand Down Expand Up @@ -6178,6 +6182,7 @@ def newPage(
colorScheme: Literal["dark", "light", "no-preference"] = None,
acceptDownloads: bool = None,
defaultBrowserType: str = None,
proxy: ProxyServer = None,
videosPath: str = None,
videoSize: IntSize = None,
recordHar: RecordHarOptions = None,
Expand Down Expand Up @@ -6222,6 +6227,8 @@ def newPage(
Emulates `'prefers-colors-scheme'` media feature, supported values are `'light'`, `'dark'`, `'no-preference'`. See page.emulateMedia(options) for more details. Defaults to '`light`'.
acceptDownloads : Optional[bool]
Whether to automatically download all the attachments. Defaults to `false` where all the downloads are canceled.
proxy : Optional[{"server": str, "bypass": Optional[str], "username": Optional[str], "password": Optional[str]}]
Network proxy settings to use with this context. Note that browser needs to be launched with the global proxy for this option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example `launch({ proxy: { server: 'per-proxy' } })`.
videosPath : Optional[str]
Enables video recording for all pages to `videosPath` folder. If not specified, videos are not recorded. Make sure to await `page.close` for videos to be saved.
videoSize : Optional[{"width": int, "height": int}]
Expand Down Expand Up @@ -6254,6 +6261,7 @@ def newPage(
colorScheme=colorScheme,
acceptDownloads=acceptDownloads,
defaultBrowserType=defaultBrowserType,
proxy=proxy,
videosPath=videosPath,
videoSize=videoSize,
recordHar=recordHar,
Expand Down
5 changes: 0 additions & 5 deletions scripts/expected_api_mismatch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,3 @@ Parameter not implemented: BrowserContext.addInitScript(arg=)
# OptionsOr
Parameter not implemented: Page.waitForEvent(optionsOrPredicate=)
Parameter not implemented: BrowserContext.waitForEvent(optionsOrPredicate=)


# 1.6 Todo
Parameter not implemented: Browser.newPage(proxy=)
Parameter not implemented: Browser.newContext(proxy=)