- 博客(15)
- 资源 (2)
- 收藏
- 关注
原创 yaml格式和读取
yaml文件中格式键值对name: tomeassword: 123列表 -100 -abc - -bb -cc1混合类型(列表里面有字典)a: tomeb: c: 10 d: 20info: - 10 - 20.引号用法 双引号 单引号a: hello\nwordb: 'hello\nword' #特殊字符 原格式输出c:"hello\nword" #转义后输出效果引用变量#‘&’ 和‘*’用于引用info: &a
2021-09-02 19:57:54
448
1
原创 PytestDeprecationWarning:The‘junit_famiLy‘defauLtvaluewillchangeto‘xunit2‘inpytest6.‘junit_family=x
pytest-html报错PytestDeprecationWarning:The’junit_famiLy’defauLtvaluewillchangeto’xunit2’inpytest6.'junit_family=x unit 1’to your pytest.ini file to keep the current format in future versions of py test and siLence this warning在test目录下创建pytest.ini文件。文件中写[
2021-02-24 16:02:26
237
转载 Tesseract-OCR的使用---提取图片中的文字,用于验证码的获取
driver = webdriver.Chrome() driver.maximize_window() driver.get('http://admin-ceshi.eyyb.vip:81/login') # driver.get("http://admin-stable.eyyb.vip/login") def VerficationCode(self): self.driver.get_screenshot_as_file(datapath+"pic..
2021-01-11 17:51:48
445
原创 判断一个列表中的单词是否在字符串中
判断一个列表中的单词是否在字符串中list=["单词","答语","句子","词组"]str1="听录音,选择正确的答语"if any(word in str1 for word in list ) #判断列表中的任一一个元素在字符串中
2020-12-22 17:30:44
943
原创 appium、selenium 傻瓜式Xpath定位示例
appium:xpath根据全部文本://*[@content-desc=‘棒棒哒’] #全匹配找到棒棒哒根据包含文本://*[contains(@content-desc,‘点赞’)] #包含点赞二字根据弟弟节点://*[@text=‘漫画’]/preceding-sibling::android.widget.TextView[@text=‘更多’] #找哥哥,当前节点的上一个根据哥哥节点://[@text=‘漫画’]/following-sibling::android.widget.
2020-11-19 22:58:00
334
1
原创 python+selenium 下拉列表数据过多时选择
百度了很久下拉列表中数据过多时怎么选择没有显示的数据,直接用Xpath定位提示找不到元素,又继续百度结合鼠标滚动,一堆都是整个页面的滑动。可能是太基础了没人问吧,后面终于想到了一个办法。鼠标悬浮+键盘点击from selenium.webdriver.common.action_chains import ActionChainsfrom selenium.webdriver.common.keys import Keysdriver=webdriver.Chrome()action=Action
2020-11-05 11:47:07
813
3
转载 jsp显示图片
在网上找了很久的资源,终于让我找到了这篇文章,一直以来对于Jsp正确显示图片,我很懵,看完并跟着他完成一次之后,终于会了。转 https://blog.youkuaiyun.com/qq_36386526/article/details/83006961...
2019-11-25 21:52:12
1375
翻译 python安装wordcloud时的错误
想安装wordcloud库很久了,一直显示error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": 问了很多了也百度了一会,要不就是说我没安装visual,要不就是说我的visual版本低,搞了好久,今天终于got一个好方法。首先进入[https://pypi.org...
2018-12-03 19:17:12
620
原创 英语词频统计
filetest.txt文本take myself as example,I used to be one of the students who had no interest andconfidence in learning English well.One day,a friend of mine recommended a bookto me,and I was totally ...
2018-11-28 20:25:43
1531
原创 科赫雪花小包裹
import turtledef koch(size,n): if n==0: turtle.fd(size) else: for angle in [0,60,-120,60]: turtle.left(angle) koch(size/3,n-1)if __name__ == '__main_...
2018-11-25 17:14:59
235
原创 python七段数码管和倒计时
8是典型的七段数码管的例子,因为刚好七段都有经过,这里我写的代码是从1开始右转。这是看Mooc视频写的一个关于用七段数码管显示当前时间# -*-coding:utf-8 -*-import turtle as timport timedef drawGap(): t.penup() t.fd(5)def drawLine(draw): drawGap() ...
2018-11-22 22:29:37
10641
3
原创 MOOC嵩天@python123作业
练习4整数加减和编写程序计算如下数列的值:1-2+3-4…966其中,所...
2018-11-21 20:28:39
9110
2
原创 MOOC嵩天@Pyhon123作业
练习3三次方格式化获得用户输入的一个数字,可能是整数或浮点数,a,计算a的三次方值,并打印输出。输出结果采用宽度20个字符、居中输出、多余字符采用减号(-)填充。...
2018-11-20 18:53:39
2550
1
原创 MOOC嵩天@Pyhon123作业
练习题2turtle正方形绘制使用turtle库,绘制一个正方形import turtle as t #给turtle库取个别名 t,方便for i in range(4): t.fd(100) t.left(90)turtle六边形绘制使用turtle库,绘制一个六边形import turtleturtle.color("black")turtle.pens...
2018-11-19 21:11:40
714
1
原创 MOOC嵩天@Pyhon123作业
练习1Hello World垂直输出"Hello World",全部代码不超过2行print('\n'.join('Hello World'))N的多次方编写一个程序,计算输入数字N的0次方到5次方结果,并依次输出这6个结果,输出结果间用空格分隔。其中:N是一个整数或浮点数。...
2018-11-18 23:39:12
1143
1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人