执行或完成此代码你需要的工具:
python解释器
pycharm集成开发环境
谷歌驱动chromedriver
Python中unittest框架的基本使用方法
有需要以上资料的可以私信哦~
以下代码完成从打开乐搏官网页面到关闭的过程,其中存在两个测试用例
其中一个测试用例点击明星讲师,另一个测试用例点击技术干货
废话不多说,直接上干货:
Python中unittest框架的基本使用方法
project = ‘最终版web自动化’
file_name = ‘公开课框架’
author = ‘wang’
time = ‘2020/12/11 15:01’
__product_name = PyCharm
“”"
Python中unittest框架的基本使用方法
“”"
导入一个框架工具
import unittest
导入驱动
from selenium import webdriver