自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 Selenium自动化初学-第六节:unittest扩展

'), ('手机号码为空', {'mobile': '', 'password': '123456'}, '用户名或密码错误'), ('SBB', {'mobile': '', 'password': '123456'}, 'SBBA')]# yag.send(['[email protected]','@126.com'],'主题1-前面的是收件人',content,['/Users/a58/Desktop/1.txt','/Users/a58/Desktop/2.txt'])

2023-06-27 19:01:01 44 1

原创 Selenium自动化初学-第五节:unittest

print("assertNotIsInstance:", self.assertNotIsInstance("a", (int, float)), '参数应该是一个int/float')# print("assertIsInstance:", self.assertIsInstance(1.2, (int, float)), '参数应该是一个int/float')# print("assertIn:", self.assertIn("a", "abc")) #a在B里。

2023-06-19 15:43:04 44

原创 Selenium自动化初学-第四节:自动化测试模型

self.driver.switch_to.frame(element) # 切换到对应的子frame下(只能子frame,不能孙frame)# self.driver.switch_to.frame(element) # 切换到对应的子frame下(只能子frame,不能孙frame)# driver.switch_to.frame(element) # 切换到对应的子frame下(只能子frame,不能孙frame)# 其余内容见test_mail.py和login_out.py。

2023-06-17 08:33:31 73 1

原创 Selenium自动化初学-第三节:WebDriver API

element1=WebDriverWait(driver,1,0.5).until(EC.text_to_be_present_in_element((By.XPATH,'//a[@href="//home.baidu.com"]'),'百度'))# element1=WebDriverWait(driver,1,0.5).until(EC.text_to_be_present_in_element_attribute((By.ID,'kw'),'class','s_ipt'),'错误')

2023-06-12 19:03:50 105 1

原创 Selenium自动化初学-第二节:python基础

print("name is :{},age is:{}".format(name,age))#格式化函数format 不指定位置就是默认顺序--推荐。# print("name is :" + name + ",age is :" + str(age)) # String 字符拼接。五、 模组-myTime.py、mokuai.py、test.py----------三、 列表、元祖、字典--------二、 分支与循环---------四、 函数、类、方法-------六、 异常---------

2023-06-07 18:37:04 58

原创 Selenium自动化初学-第一节:环境的搭建

python&Selenium会自动关闭浏览器,所以可以写上option不让其关闭也可定义全局的driver。

2023-06-06 15:34:47 60 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除