# Selenium **Repository Path**: jia20220830/selenium ## Basic Information - **Project Name**: Selenium - **Description**: 使用selenium对web网面功能自动化 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 7 - **Forks**: 4 - **Created**: 2022-11-28 - **Last Updated**: 2025-04-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: Selenium, web自动化, pytest, Python ## README # WEB功能自动化 ## 项目介绍: 使用python+selenium对web页面功能进行操作验证 ## 技术特点: 1.selenium8大基本定位方式 * id * name * class_name * link_text * xpath * css * tag_name * partial_link 2.对selenium再次封装,利用关键字驱动 ## 界面展示: ![image](https://user-images.githubusercontent.com/83941545/203804593-2897d65a-b60b-4ecf-aaff-169c9db985c7.png) ![image](https://user-images.githubusercontent.com/83941545/203804769-dad5f5be-1f27-4e0c-b466-c3d446558db2.png) ## 项目环境: win 10 selenium 4.82 python 3.9 pytest 6.2.4 allure 2.9.43 --- ## 环境安装: 使用国内镜像安装所需第三方库 ``` pip install -r requirements.txt -i https://mirror.baidu.com/pypi/simple ``` 检查chrome版本,在浏览器输入 ```commandline chrome://version ``` 查看[chromeDriver](http://chromedriver.storage.googleapis.com/index.html)版本,chrome driver与chrome版本要匹配 ```commandline http://chromedriver.storage.googleapis.com/index.html ``` --- ## 目录介绍: case ---------->测试案例 common ------>通用方法 config ------- -->配置文件 Data ------------>测试数据 profile ---------------webdriver配置options,避免页面出现不安全 report --------------->测试报告 run ------------------->执行用例总入口 requirement.txt ------>所需要安装的第三方库 pytest.ini --------------->pytest的配置项 readme.md ------------>项目说明 .gitignore -------------->更新git时,不需要变动的文件 ---