METADATA 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. Metadata-Version: 2.4
  2. Name: playwright
  3. Version: 1.58.0
  4. Summary: A high-level API to automate web browsers
  5. Author: Microsoft Corporation
  6. License-Expression: Apache-2.0
  7. Project-URL: homepage, https://github.com/Microsoft/playwright-python
  8. Project-URL: Release notes, https://github.com/microsoft/playwright-python/releases
  9. Classifier: Topic :: Software Development :: Testing
  10. Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
  11. Classifier: Intended Audience :: Developers
  12. Classifier: Programming Language :: Python :: 3
  13. Classifier: Programming Language :: Python :: 3.9
  14. Classifier: Programming Language :: Python :: 3.10
  15. Classifier: Programming Language :: Python :: 3.11
  16. Classifier: Programming Language :: Python :: 3.12
  17. Classifier: Programming Language :: Python :: 3.13
  18. Classifier: Operating System :: OS Independent
  19. Requires-Python: >=3.9
  20. Description-Content-Type: text/markdown
  21. License-File: LICENSE
  22. Requires-Dist: pyee<14,>=13
  23. Requires-Dist: greenlet<4.0.0,>=3.1.1
  24. Dynamic: license-file
  25. # 🎭 [Playwright](https://playwright.dev) for Python [![PyPI version](https://badge.fury.io/py/playwright.svg)](https://pypi.python.org/pypi/playwright/) [![Anaconda version](https://img.shields.io/conda/v/microsoft/playwright)](https://anaconda.org/Microsoft/playwright) [![Join Discord](https://img.shields.io/badge/join-discord-infomational)](https://aka.ms/playwright/discord)
  26. Playwright is a Python library to automate [Chromium](https://www.chromium.org/Home), [Firefox](https://www.mozilla.org/en-US/firefox/new/) and [WebKit](https://webkit.org/) browsers with a single API. Playwright delivers automation that is **ever-green**, **capable**, **reliable** and **fast**. [See how Playwright is better](https://playwright.dev/python).
  27. | | Linux | macOS | Windows |
  28. | :--- | :---: | :---: | :---: |
  29. | Chromium <!-- GEN:chromium-version -->145.0.7632.6<!-- GEN:stop --> | ✅ | ✅ | ✅ |
  30. | WebKit <!-- GEN:webkit-version -->26.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
  31. | Firefox <!-- GEN:firefox-version -->146.0.1<!-- GEN:stop --> | ✅ | ✅ | ✅ |
  32. ## Documentation
  33. [https://playwright.dev/python/docs/intro](https://playwright.dev/python/docs/intro)
  34. ## API Reference
  35. [https://playwright.dev/python/docs/api/class-playwright](https://playwright.dev/python/docs/api/class-playwright)
  36. ## Example
  37. ```py
  38. from playwright.sync_api import sync_playwright
  39. with sync_playwright() as p:
  40. for browser_type in [p.chromium, p.firefox, p.webkit]:
  41. browser = browser_type.launch()
  42. page = browser.new_page()
  43. page.goto('http://playwright.dev')
  44. page.screenshot(path=f'example-{browser_type.name}.png')
  45. browser.close()
  46. ```
  47. ```py
  48. import asyncio
  49. from playwright.async_api import async_playwright
  50. async def main():
  51. async with async_playwright() as p:
  52. for browser_type in [p.chromium, p.firefox, p.webkit]:
  53. browser = await browser_type.launch()
  54. page = await browser.new_page()
  55. await page.goto('http://playwright.dev')
  56. await page.screenshot(path=f'example-{browser_type.name}.png')
  57. await browser.close()
  58. asyncio.run(main())
  59. ```
  60. ## Other languages
  61. More comfortable in another programming language? [Playwright](https://playwright.dev) is also available in
  62. - [Node.js (JavaScript / TypeScript)](https://playwright.dev/docs/intro),
  63. - [.NET](https://playwright.dev/dotnet/docs/intro),
  64. - [Java](https://playwright.dev/java/docs/intro).