上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 16 下一页
摘要: 代码如下: from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains import time from log_module import Xlloginfo fro 阅读全文
posted @ 2020-03-13 22:10 忆梦,惊梦 阅读(247) 评论(0) 推荐(0)
摘要: 代码 from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains import time from log_module import Loginfo from use 阅读全文
posted @ 2020-03-13 19:22 忆梦,惊梦 阅读(494) 评论(0) 推荐(0)
摘要: 代码如下: from selenium import webdriver import time from log_module import Loginfo from userdata import get_webinfo,get_userinfo def openBrower(): webdri 阅读全文
posted @ 2020-03-13 15:33 忆梦,惊梦 阅读(430) 评论(0) 推荐(0)
摘要: 分离前: from selenium import webdriver import time def test(): d = webdriver.Firefox() d.get('https://www.imooc.com/') d.find_element_by_link_text("登录"). 阅读全文
posted @ 2020-03-12 21:04 忆梦,惊梦 阅读(473) 评论(0) 推荐(0)
摘要: setUp线程组最先执行,比如用登陆接口,获取cookie tearDown线程组最后执行,比如做清除测试数据之用,建一个jdbc请求,清除执行产生的数据,下次执行就不用修改数据。 普通线程组不想随机执行时,勾选下图的复选框 线程数:模拟用户,类似虚拟用户数 Ramp-Up Period (in s 阅读全文
posted @ 2020-01-15 21:32 忆梦,惊梦 阅读(153) 评论(0) 推荐(0)
摘要: 1、下载安装charles 2、安装好以后,打开charles,配置charles证书 Help——SSL Proxying——Install Charles Root Certificate 查看证书是否安装成功 3、选择Proxy——SSL Proxy Setting,添加Location Ho 阅读全文
posted @ 2020-01-10 14:30 忆梦,惊梦 阅读(1279) 评论(0) 推荐(0)
摘要: Alter对象switch_to.alert() 切到alert,返回一个alert对象accept 确认dismiss 取消send_keys() 有输入框才能使用,否则报错 alter = d.switch_to.alert() alter.accept() from selenium impo 阅读全文
posted @ 2020-01-03 14:50 忆梦,惊梦 阅读(283) 评论(0) 推荐(0)
摘要: 1、等待是为了使脚本执行更加稳定2、常用的休眠方式:time模块的sleep方法 浏览器等待1) 显示等待 显示等待是根据条件进行等待,等待条件出现 实现: from selenium.webdriver.common.by import By from selenium.webdriver.sup 阅读全文
posted @ 2020-01-03 14:22 忆梦,惊梦 阅读(273) 评论(0) 推荐(0)
摘要: 多窗口切换 方法:(1)driver.current_window_handle 获取当前窗口句柄(2)driver.window_handles 获取所有窗口句柄(3)driver.switch_to.window(handle) 切换指定句柄窗口(4)driver.close() 关闭当前的句柄 阅读全文
posted @ 2020-01-02 21:46 忆梦,惊梦 阅读(288) 评论(0) 推荐(0)
摘要: 一、鼠标事件 导入动作链类,动作链可以储存鼠标的动作,并一起执行 from selenium.webdriver import ActionChains ActionChains(driver) 执行ActionChains中储存的所有动作 perform() ①导入 ActionChains:fr 阅读全文
posted @ 2019-12-27 21:28 忆梦,惊梦 阅读(195) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 16 下一页