File tree Expand file tree Collapse file tree 2 files changed +33
-4
lines changed
Expand file tree Collapse file tree 2 files changed +33
-4
lines changed Original file line number Diff line number Diff line change 1+ # Copyright (c) Microsoft Corporation.
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
115import asyncio
16+
217from playwright .async_api import async_playwright
318
419
@@ -7,8 +22,8 @@ async def main() -> None:
722 for browser_type in [p .chromium , p .firefox , p .webkit ]:
823 browser = await browser_type .launch ()
924 page = await browser .new_page ()
10- await page .goto (' http://playwright.dev' )
11- await page .screenshot (path = f' example-{ browser_type .name } .png' )
25+ await page .goto (" http://playwright.dev" )
26+ await page .screenshot (path = f" example-{ browser_type .name } .png" )
1227 await browser .close ()
1328
1429
Original file line number Diff line number Diff line change 1+ # Copyright (c) Microsoft Corporation.
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
115from playwright .sync_api import sync_playwright
216
317
@@ -6,8 +20,8 @@ def main() -> None:
620 for browser_type in [p .chromium , p .firefox , p .webkit ]:
721 browser = browser_type .launch ()
822 page = browser .new_page ()
9- page .goto (' http://playwright.dev' )
10- page .screenshot (path = f' example-{ browser_type .name } .png' )
23+ page .goto (" http://playwright.dev" )
24+ page .screenshot (path = f" example-{ browser_type .name } .png" )
1125 browser .close ()
1226
1327
You can’t perform that action at this time.
0 commit comments