上一页 1 2 3 4 5 6 7 8 ··· 11 下一页
摘要: import uiautomation, time, os, random# 借助 inspect。exe 工具定位def cal_test(): os.system('calc.exe') time.sleep(2) cal = uiautomation.WindowControl(Name='计 阅读全文
posted @ 2020-03-28 19:47 千年妖狐 阅读(527) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv=" 阅读全文
posted @ 2019-12-09 21:09 千年妖狐 阅读(127) 评论(0) 推荐(0) 编辑
摘要: from urllib.parse import urlencode, quote, unquote # urlencode方法参数是字典 body = { "content": "悠悠", "charsetSelect": "utf-8", "en": "UrlEncode编码" } print( 阅读全文
posted @ 2019-09-26 18:51 千年妖狐 阅读(329) 评论(0) 推荐(0) 编辑
摘要: r = s.get(loginurl, verify=False) dom = etree.HTML(r.content.decode("utf-8")) try: result["lt"] = dom.xpath('//input[@name="lt"]')[0].get("value") res 阅读全文
posted @ 2019-09-26 18:49 千年妖狐 阅读(550) 评论(0) 推荐(0) 编辑
摘要: # python3字符串换行,在右边加个反斜杠 body = '<?xml version="1.0" encoding = "UTF-8"?>' \ '<COM>' \ '<REQ name="上海-悠悠">' \ '<USER_ID>yoyoketang</USER_ID>' \ '<COMMO 阅读全文
posted @ 2019-09-26 18:45 千年妖狐 阅读(1044) 评论(0) 推荐(0) 编辑
摘要: total_seconds 总时长,单位秒 days 以天为单位 microseconds (>= 0 and less than 1 second) 获取微秒部分,大于0小于1秒 seconds Number of seconds (>= 0 and less than 1 day) 秒,大于0小 阅读全文
posted @ 2019-09-26 18:40 千年妖狐 阅读(251) 评论(0) 推荐(0) 编辑
摘要: '''判断title是否是一致,返回布尔值'''WebDriverWait(driver,10,0.1).until(EC.title_is("title_text"))'''判断title是否与包含预期值,返回布尔值'''WebDriverWait(driver,10,0.1).until(EC. 阅读全文
posted @ 2019-09-26 18:35 千年妖狐 阅读(407) 评论(0) 推荐(0) 编辑
摘要: pip install requests-toolbelt from requests_toolbelt import MultipartEncoder import requests m = MultipartEncoder( fields={'field0': 'value', 'field1' 阅读全文
posted @ 2019-09-26 18:27 千年妖狐 阅读(741) 评论(0) 推荐(0) 编辑
摘要: # 测试数据testData =[ ] @ddt.ddtclass Bolg(unittest.TestCase): @ddt.data(*testData) def test_login(self, data): u'''登录案例参考''' print ("当前测试数据%s"%data) # 调用 阅读全文
posted @ 2019-09-26 18:12 千年妖狐 阅读(174) 评论(0) 推荐(0) 编辑
摘要: unittest常用的断言方法 1.assertEqual(self, first, second, msg=None) --判断两个参数相等:first == second 2.assertNotEqual(self, first, second, msg=None) --判断两个参数不相等:fi 阅读全文
posted @ 2019-09-26 17:58 千年妖狐 阅读(1382) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 11 下一页