2019年12月16日
摘要:
report_path = os.path.join(os.getcwd(),"report1")now = time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(time.time()))report_abspath = os.path.join(rep
阅读全文
posted @ 2019-12-16 16:54
wenjingtester
阅读(1182)
推荐(0)
2019年12月13日
摘要:
链接:https://www.jianshu.com/p/4c3330c1cdb5 (1)div弹窗 (2)新标签页弹窗 (3)alert弹窗 一,div弹窗 div弹窗是浏览器中比较好定位的弹窗,定位的方法与普通的元素一样。不过这里会有一个坑,明明可以找到这个按钮,但是就是定位不到。这个就是因为当
阅读全文
posted @ 2019-12-13 18:55
wenjingtester
阅读(1573)
推荐(0)
摘要:
点击报错 使用Selenium时,触发点击事件,经常报如下异常: Element is not clickable at point1原因及解决方法 无外乎四种原因 未加载 没加载出来就等待元素加载出来,再往下执行。 可以使用python库time import time time.sleep(3)
阅读全文
posted @ 2019-12-13 13:47
wenjingtester
阅读(2680)
推荐(0)
2019年12月12日
posted @ 2019-12-12 19:21
wenjingtester
阅读(122)
推荐(0)
摘要:
https://www.cnblogs.com/zddwork/p/11780977.html
阅读全文
posted @ 2019-12-12 19:02
wenjingtester
阅读(209)
推荐(0)
摘要:
str1="hello"try: print("%d" %str1)except Exception as F: print(F)finally: print("%s" %str1)
阅读全文
posted @ 2019-12-12 18:07
wenjingtester
阅读(138)
推荐(0)
摘要:
file_path='file:///'+os.path.abspath('case.html') 用浏览器的方式打开一个页面+获取绝对路径 处理弹窗: dr=webdriver.IE()dr.switch_to_alert() 处理弹窗dr.switch_to_alert().accept() 确
阅读全文
posted @ 2019-12-12 18:03
wenjingtester
阅读(597)
推荐(0)
摘要:
链接地址:https://blog.csdn.net/yoyocat915/article/details/80167671
阅读全文
posted @ 2019-12-12 17:56
wenjingtester
阅读(543)
推荐(0)
摘要:
第一种方式:键盘操作:通过定位(用xpath)页面最底部元素,运用键盘的down键移到底部 dr.find_element_by_xpath().send_keys(keys.DOWN)dr.find_element_by_xpath().send_keys(keys.UP) 第二种:通过js(通用
阅读全文
posted @ 2019-12-12 17:49
wenjingtester
阅读(1932)
推荐(0)
摘要:
GeckoDriver用于驱动Firefox,在这之前请确保已经正确安装好了Firefox浏览器并可以正常运行。 一、GeckoDriver的安装 GitHub:https://github.com/mozilla/geckodriver 下载地址:https://github.com/mozill
阅读全文
posted @ 2019-12-12 10:19
wenjingtester
阅读(398)
推荐(0)