基于 Python + Selenium 的 Web 自动化测试设计与实现 Design and Implementation of Web Automatic Testing Based on Python and Selenium 中文摘要□□计算机行业更新迭代快速,功能就会越多,也就会越复杂,出现 bug的概率也就会变高,这将会导致发现到 bug 的时间不确定的延长,bug 越晚被发现的话,修复它的成本就会变高;而自动化使得一系列测试方面的问题得到了有效的解决,它代替频繁而且重复的人工操作,以此达到提高测试效率的目的。而 Selenium 作为其中一款免费且开源的 WebUI 自动化和接口自动化测试工具,适用于不同 platform 和 browser,有利于测试人员搭建 Web自动化测试环境。本论文以 Selenium 和 Python 为基础对 Web 进行设计与实现自动化测试,项目中以 pageobject 设计模式主要实现了三个主模块,分别是页面对象模块(page)、测试用例模块(testcase)、公共模块(common),以这三个模块展开了自动化测试。本项目实现了以 selenium 模拟人工进行测试,针对不同的 browser和业务展开工作,在规范测试流程、提高效率方面有一定意义。□□关键词:Python Selenium pageobject 自动化测试 Web 测试 Abstract □In the computer industry, the update iteration is fast, the more complex the functions are, the higher the risk of bugs, which makes the time of finding bugs longer, the later the bugs are found, the higher the cost of fixing bugs is; and the Web automation test makes this series of problems effectively solved, which replaces frequent and repeated manual operations, so as to achieve the purpose of improving test efficiency.As one of the free open source automation testing components, Selenium is suitable for Web applications across different browsers and platforms, which provides a good support for testers to build Web automation testing. This paper designs and implements Web automation test based on Selenium + Python, including log management module (logs), page object module (page), test case script module (testcase), common module, etc.In t...