|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/playwright-with-python-for-web-automation-testing/
课程评论:没有评论
**课程名称:** 使用 Python 和 Playwright 进行 Web 自动化测试 + 视觉测试 **课程概述:** 本课程将从零开始,快速搭建一套基于 Python 和 pytest 的自动化测试框架。我们将深入集成 Playwright 的强大功能,利用 pytest 的标记(markers)、夹具(fixtures)和命令行接口(CLI commands)来提升测试效率。 **课程内容涵盖:** * Python 基础知识 * Playwright 核心功能 * Pytest 框架应用 * 项目结构设计 * 页面对象模型(Page Object Model) * 测试报告生成 * 并行执行测试 * 创建自定义 pytest fixtures(用于 setup 和 teardown) * 利用现有的 Playwright fixtures * 使用 GitHub Actions 将测试部署到 CI/CD 流水线 * 学习 YAML 语法 * 安全存储登录密码(通过 GitHub Secrets) * 高级视觉测试技巧 **为何选择 Playwright?** Playwright 是一款能够实现快速、可靠且功能强大的跨浏览器自动化测试工具。 * **全方位浏览器支持:** 支持 Chromium(Chrome, Edge)、WebKit(Safari)和 Firefox,可在有界面(headful)和无界面(headless)模式下运行测试。 * **极致的速度和可靠性:** * **内置自动等待 API:** Playwright 会自动等待元素就绪,从而提高测试的稳定性并简化测试脚本编写。 * **快速隔离的浏览器上下文:** 可在单个浏览器实例中为多个独立的测试环境创建浏览器上下文,实现高效隔离。 * **强大的元素选择器:** 支持通过用户可见的文本内容和可访问性标签等方式选择元素,提高脚本的韧性。 * **跨多域、多页面和多框架支持:** Playwright 作为一种进程外自动化驱动程序,不受页面内 JavaScript 执行范围的限制,能够自动化处理涉及多个页面、框架的复杂场景。
Spin up your automation framework from scratch in a matter of days! It's super fast with Python and pytest. Then comes Playwright with its nitrogen-fast browser test execution! We are going to blend Playwright capabilities into the pytest framework with the use of markers, fixtures, CLI commands.In this course we will cover:Python basicsPlaywrightPytestproject structurepage object modelreportingparallel executioncreate our own pytest fixtures for set_up and tear_down methodsutilize existing Playwright fixturesdeploy our test to CI/CD using GitHub ActionsLearn yml syntaxStore login passwords securely as GitHub SecretsPerform Visual Testing like a proWhy Playwright?Playwright enables fast, reliable and capable testing and automation across all modern browsers.Support for all browsersTest on Chromium, Firefox and WebKit. Playwright has full API coverage for all modern browsers, including Google Chrome and Microsoft Edge (with Chromium), Apple Safari (with WebKit) and Mozilla Firefox. Test can run in headful and headless modesFast and reliable executionBy fast I mean REALLY fast!Auto-wait APIs. Playwright interactions auto-wait for elements to be ready. This improves reliability and simplifies test authoring.Fast isolation with browser contexts. Reuse a single browser instance for multiple isolated execution environments with browser contexts.Resilient element selectors. Playwright can rely on user-facing strings, like text content and accessibility labels to select elements.Multiple domains, pages and frames. Playwright is an out-of-process automation driver that is not limited by the scope of in-page JavaScript execution and can automate scenarios with multiple pages.