自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 working with cookies

from selenium import webdriverimport time# 添加Cookiewith webdriver.Chrome() as driver: print('进入示例网址') driver.get("http://www.example.com") print('添加cookie') # Adds the cookie into current browser context driver.add_cookie({"name": .

2020-08-25 03:16:18 114

原创 mouse and keyboard actions in detail

from selenium import webdriverfrom selenium.webdriver.common.by import Byimport time# clickAndHoldwith webdriver.Chrome() as driver: print('打开百度') driver.get("https://www.baidu.com") # Store 'google search' button web element print('.

2020-08-25 03:03:56 196

原创 page models

from selenium import webdriverfrom selenium.webdriver.common.by import Byimport time""" 页面对象封装登录页"""class SignInPage: def __init__(self, driver): self.driver = driver # <input name="user_name" type="text" value=""> .

2020-08-24 14:07:22 157

原创 keyboard

from selenium import webdriverfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.common.keys import Keysimport timetry: # send_keys发送按键消息 print('发送按键消息') driver = webdriver.Chrome() print('打开百度') driver.get("http:/.

2020-08-24 08:19:53 223

原创 waits

from selenium import webdriverfrom selenium.common.exceptions import ElementNotVisibleException, ElementNotSelectableExceptionfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.support.ui import WebDriverWaitdef document_initialised(d.

2020-08-24 07:50:18 169

原创 page loading strategy

from selenium import webdriverfrom selenium.webdriver.chrome.options import Optionstry: options = Options() print('设置页面加载策略为normal') options.page_load_strategy = 'normal' driver = webdriver.Chrome(options=options) print('打开百度') .

2020-08-24 07:48:55 781

原创 browser main pulation 02

from selenium import webdriverfrom selenium.webdriver.support.ui import WebDriverWaitfrom selenium.webdriver.support import expected_conditions as ECfrom selenium.webdriver.common.by import Bytry:# 启动驱动程序 driver = webdriver.Chrome() print('打.

2020-08-24 07:46:52 173

原创 browser mainpulation

# 要实例化 Chrome/Chromium 会话,您可以执行以下操作:# 简单赋值from selenium.webdriver import Chromedriver = Chrome()# 打开网站driver.get("https://selenium.dev")# 获得当前 URLprint(driver.current_url)# 按下浏览器的后退按钮:driver.back()# 按下浏览器的前进键:driver.forward()# 刷新当前页面dri.

2020-08-24 07:46:19 235

原创 web element

from selenium import webdriverfrom selenium.webdriver.common.by import Bywith webdriver.Chrome() as driver: print('进入百度') driver.get("https://www.baidu.com/") print('选中name为wd的单个搜索框') search_box = driver.find_element(By.NAME, "wd") .

2020-08-24 07:44:53 392

原创 软件测试基础知识(2)

软件测试分类:按是否查看源代码:黑盒测试,白盒测试。黑盒测试:又称数据驱动测试,不考虑内部结构和内部特性,注重于软件的功能需求,只关心软件的输入数据和输出数据(不看代码)。黑盒测试能发现以下错误:功能不对或者功能遗漏;界面错误;数据库访问或者处理错误;性能问题。优点:测试人员不需要了解实现的细节,包括特定的编程语言(没有编程经验的人也可以设计测试用例);测试人...

2020-04-08 10:36:04 380

空空如也

空空如也

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

TA关注的人

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