上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 27 下一页
摘要: 1、iframe切换 切换到对应的iframe标签中可以进行定位切换方法:driver.switch_to.framedriver.switch_to.frame(名称)driver.switch_to.frame(索引)driver.switch_to.frame(elements节点) driv 阅读全文
posted @ 2020-05-17 17:56 mkay 阅读(395) 评论(0) 推荐(0) 编辑
摘要: def a(x): return x print(a) #不带括号调用的结果:<function a at 0x1091766a8> print(a(3)) #带括号调用的结果:3 1、不带括号时,调用的是这个函数本身2、带括号(此时必须传入需要的参数),调用的是函数的return结果 参考:htt 阅读全文
posted @ 2020-05-14 18:45 mkay 阅读(1739) 评论(2) 推荐(0) 编辑
摘要: 报错1:__init__() takes 1 positional argument but 2 were given 原因:进入源码可以看到,alert_is_present是一个class类,因此调用的时候要加上括号alert_is_present() 报错2:TypeError: 'Alert 阅读全文
posted @ 2020-05-14 17:07 mkay 阅读(1171) 评论(0) 推荐(0) 编辑
摘要: driver = webdriver.Chrome() driver.get('https://www.12306.cn/index/') # 通过js代码修改元素的属性 from_ele = driver.find_element_by_id("fromStationText") to_ele = 阅读全文
posted @ 2020-05-12 13:43 mkay 阅读(404) 评论(0) 推荐(0) 编辑
摘要: http://idea.medeming.com/jihuoma/ 阅读全文
posted @ 2020-04-27 16:19 mkay 阅读(1364) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/ywk_hax/article/details/82633542 find_element():查找一个元素 find_elements():查找多个元素并返回一个列表 阅读全文
posted @ 2020-04-26 17:18 mkay 阅读(2559) 评论(0) 推荐(0) 编辑
摘要: 1、打开pycharm的terminal,到 requirements.txt 所在的目录下,使用如下命令 ,就能在当前的 python 环境中导入所有需要的包 pip3 install -r requirements.txt 2、打开pycharm的terminal,到 requirements. 阅读全文
posted @ 2020-04-23 14:52 mkay 阅读(792) 评论(0) 推荐(0) 编辑
摘要: 写入的数据前加上str(),转成str格式 阅读全文
posted @ 2020-04-20 17:06 mkay 阅读(9589) 评论(0) 推荐(0) 编辑
摘要: import json python转为json:json.dumps(obj) json转为python:json.loads(obj) import json """ json python [] : json中的数组 列表 list {} : json中的对象 字典dict true True 阅读全文
posted @ 2020-04-18 23:49 mkay 阅读(1610) 评论(0) 推荐(0) 编辑
摘要: webservice接口:一个url下包含多个接口,返回数据为xml文档 安装模块 pip install suds-jurko from suds import client url = "https://xxxxxx" cli = client.Client(url=url) # 查看该webs 阅读全文
posted @ 2020-04-18 23:26 mkay 阅读(565) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 27 下一页