Abstract:Manual testing is inefficient. To effectively reduce labor costs and address the common problems of poor stability and low test case execution efficiency in traditional Selenium-based frameworks, in-depth research was conducted on the Playwright automated testing tool. By leveraging its advantages such as intelligent waiting and native support for multiple browsers, it was deeply integrated with the Pytest testing framework, and a layered design approach was adopted to achieve code reusability and ease of maintenance. A set of automated testing framework based on Playwright and Pytest was designed and implemented. Additionally, to address the pain points of complex dependency package installation and environment configuration in a local area network environment, a practical method for framework setup in such an environment was developed. Project application verification has demonstrated significant improvements in test execution efficiency and stability, as well as a substantial reduction in testing costs.