Giter Site home page Giter Site logo

biancard / selenium-framework Goto Github PK

View Code? Open in Web Editor NEW

This project forked from strawberryflavor/selenium-framework

0.0 1.0 0.0 13.12 MB

基于python的selenium UI自动化测试框架,采用Page Object设计模式进行二次开发,通过对页面对象和测试代码进行分离,并封装了日志输出,浏览器引擎选择,二次封装常用方法。降低后期因页面变化带来的维护成本,减少了代码的重复,提高测试用例的可读性

Python 100.00%

selenium-framework's Introduction

Selenium UI 自动化测试框架(基于python)

框架目录构造:

  • config: 用来存储配置文件,如 config.ini 文件,配种了所需浏览器方式及被测地址

  • framwork:框架底层封装层,可以根据自己的想法封装底层方法

    • logger.py:封装了日志输入,包括文件输出和控制台的输出
    • base_page:封装了selenium库中常用的方法,包括对象查找,截图输出,浏览器的前进后退,清除和输入
    • browser_engine:通过读取配置文件去选择浏览器和url,并返回浏览器对象实例
  • screenshots:用于接收测试过程中错误截图文件

  • logs:用于接收日志文件的输出

  • pageobjects:用于封装页面对象,百度首页示例

  • test_report:用于接收测试报告文件的输出

  • testsuites:用于测试用例的存放和用例集合套件 ,示例:TestRunner.py

  • tools:用于存放浏览器的 selenium 驱动

selenium-framework's People

Contributors

strawberryflavor avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.