随笔分类 -  selenium+python

摘要:使用场景:项目中接口测试登录接口原先是明文密码登录,改版后需要用加密密码 询问开发得知加密规则:密码MD5加密加上时间戳整型,然后对MD5加密加上时间戳整型再进行一次加密 自己写的代码: 优化后代码: 在工具tools下封装 阅读全文
posted @ 2018-08-28 16:18 dieyaxianju 阅读(307) 评论(0) 推荐(0)
摘要:默认输入框 鼠标点击上去还有文案 直接用 clear不可以 阅读全文
posted @ 2018-06-21 16:51 dieyaxianju 阅读(214) 评论(0) 推荐(0)
摘要:selenium使用chrome抓取自动消失弹框的方法 转:https://blog.csdn.net/kennin19840715/article/details/76512394 阅读全文
posted @ 2018-05-14 13:44 dieyaxianju 阅读(873) 评论(0) 推荐(0)
摘要:场景:系统中需要用到配置后的chrome,比如麦克风启用,selenium原始启用的是初始化的 需要配置,配置后如下 浏览器查看配置,使用chrome://settings/content 一、加载所有Chrome配置 用Chrome地址栏输入chrome://version/,查看自己的“个人资料 阅读全文
posted @ 2018-03-10 17:13 dieyaxianju 阅读(3533) 评论(1) 推荐(1)
摘要:环境python3.5+jenkins # coding:utf-8 import urllib.request import json import sys import time import re class dingHook(object): def __init__(self,sys): 阅读全文
posted @ 2018-01-20 18:10 dieyaxianju 阅读(816) 评论(0) 推荐(0)
摘要:sys.argv 参数 「argv」是「argument variable」参数变量的简写形式。一般在命令行调用的时候由系统传递给程序。这个变量其实是一个List列表,argv[0] 一般是“被调用的脚本文件名或全路径”,这个与操作系统有关,argv[1]和以后就是传入的系统命令参数。 sys.ar 阅读全文
posted @ 2018-01-15 20:52 dieyaxianju 阅读(219) 评论(0) 推荐(0)
摘要:是的 阅读全文
posted @ 2018-01-10 16:38 dieyaxianju 阅读(172) 评论(0) 推荐(0)
摘要:https://huilansame.github.io/huilansame.github.io/archivers/good-website-to-learn-selenium 自动化框架的构思以及POM思想搭建框架的优势http://blog.csdn.net/weixin_38079422/ 阅读全文
posted @ 2018-01-10 14:41 dieyaxianju 阅读(147) 评论(0) 推荐(0)
摘要:1.点击保存给的提示是几秒钟,遮罩显示 2. 其他弹窗处理方法 http://blog.csdn.net/Real_Tino/article/details/59068827 阅读全文
posted @ 2018-01-09 10:38 dieyaxianju 阅读(2160) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/jinzhuduoduo/articles/7017405.html http://www.lxway.com/445949491.htm https://www.cnblogs.com/feiyi211/p/6625841.html 阅读全文
posted @ 2018-01-02 21:20 dieyaxianju 阅读(1511) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/huilan_same/article/details/52544521 1.强制等待 不管浏览器加载出元素没有,都必须等待X时间 sleep(3) # 强制等待4秒再执行下一步 2.隐性等待 等待元素X时间,如果元素这X时间内出来了,则马上进行下一步啊,不 阅读全文
posted @ 2017-12-28 20:19 dieyaxianju 阅读(512) 评论(0) 推荐(0)
摘要:背景:python+selenium+pytest+html报告 环境:我的是本机的Jenkins配置本机的代码 前提:要下载好HTML Publisher plugin插件【系统管理》管理插件》可选插件》搜索HTML,下载后在构建后操作就有Publish HTML report的选项】 配置: s 阅读全文
posted @ 2017-12-16 15:15 dieyaxianju 阅读(6205) 评论(1) 推荐(2)
摘要:F:\python\python35\Scripts https://www.cnblogs.com/tester-hehehe/p/5504086.html 阅读全文
posted @ 2017-12-15 20:14 dieyaxianju 阅读(123) 评论(0) 推荐(0)
摘要:解决:Selenium RC未启动,启动即可。 java -jar selenium-server-standalone-2.25.0.jar 启动RC报错,提示找不到firefox的path,于是配置firefox的环境变量 阅读全文
posted @ 2017-09-28 22:29 dieyaxianju 阅读(282) 评论(0) 推荐(0)
摘要:1.用xpath可以在chrome找到 $x("//mandatory-config-dialog[@is-show='isShowMandatoryConfig']/div/div[2]/div[3]/button[1]") 封装的方法:【待优化去除两边空格】 阅读全文
posted @ 2017-09-26 16:49 dieyaxianju 阅读(429) 评论(0) 推荐(0)
摘要:需要安装pytest和pytest-html pip3 install -U pytest pip3 install -U pytest-html 阅读全文
posted @ 2017-05-19 15:59 dieyaxianju 阅读(415) 评论(0) 推荐(0)
摘要:1、创建一个简单的Python工程 在主菜单中,选择File | New Project ,并指定Python解释器版本 2.创建python类,快捷键alt+insert 3.编写打开浏览器的代码,导入selenium 去安装selenium 首先 查看已经安装的 发现pip需要升级 于是 继续安 阅读全文
posted @ 2017-05-19 11:34 dieyaxianju 阅读(226) 评论(0) 推荐(0)