09 2021 档案
摘要:# 1.定位元素8种方法# 1)元素id属性element0 = driver.find_element_by_id('元素id')# 2)xpathelement1 = driver.find_element_by_xpath('xpath定位')# 3)csselement2 = driver.
阅读全文
摘要:# 1.一个最简单的web自动化列子from selenium import webdriverdriver = webdriver.Chrome()driver.get("http://www.xxx.com")# 2.selenium原理"""selenium http协议 底层对接 操作(代码
阅读全文
摘要:Python做接口自动化,用unittest和pytest框架,思路如下。# 导入不是一次性写的,而是用到哪个导入哪个,一般python自带库写在上面,自己封装的库写在下面# 1. unittest写法import unittestimport requestsfrom unittestreport
阅读全文
摘要:接口自动化中logging的使用import logging# 1)基本使用五个等级info,debug,warning,error.criticallogging.info("info级别的日志")# 2)创建日志收集器log = logging.getLogger('apiautotest')#
阅读全文

浙公网安备 33010602011771号