xpath get element ------------method and exception---------frame
来源:互联网 发布:欲安所归乎 编辑:程序博客网 时间:2024/06/15 02:02
from selenium import webdriverimport timeimport osdef delay(): time.sleep(2)browser = webdriver.Firefox()#browser.get("http://bbs.anjian.com/")#browser.get("https://www.baidu.com")browser.get("http://passport.wanmei.com/login?location=L3NhZmUv")delay()#browser.find_element_by_xpath("//*[@id='kw']").send_keys("中国")#browser.find_element_by_xpath("//*[@id='u1']/a[text()='新闻']").click()#browser.find_element_by_xpath("//*/a[contains(@href,'ir.baidu')]").click()#里面有一个iframe xpath不能直接操作frameid=browser.find_element_by_xpath("//iframe")browser.switch_to_frame(frameid)browser.find_element_by_xpath("//*/a[contains(@href,'toregis')]").click()delay()print("end")#browser.close()
阅读全文
0 0
- xpath get element ------------method and exception---------frame
- Multiple operations with path 'api/Plan/AllocateTransport' and method 'GET'
- jQuery:get value of specified element using val not value method...
- Exception in thread "main" java.net.ProtocolException: Invalid HTTP method: get
- the finite element method
- Stale Element Reference Exception
- XPath and XPointer [ILLUSTRATED]
- XPath and XML Namespaces
- XPath and Regular Expressions
- XPath and CSS Selectors
- xpath and regular expression
- Get element by JavaScript
- 巧用Get Matching Xpath Count
- shark spark exception found method
- frameset and frame , 连接
- Emacs Frame and buffer
- JavaScript -- Frame and window
- hash and frame (draft)
- 疯狂输出 ⚔ Java中的随机数
- 创建内联样式表
- 微信小程序从入门到放弃(七)
- String -compareTo()方法
- kafka踩到的坑:kafka.common.FailedToSendMessageException: Failed to send messages after 3 tries.
- xpath get element ------------method and exception---------frame
- Hibernate的级联操作
- .NET
- 8张图理解Java
- 【FreeMarker学习】FreeMarker中If、List使用
- BZOJ1083(SCOI2005)[繁忙的都市]--最小生成树
- 41. First Missing Positive
- HDU 1026 Ignatius and the Princess I
- android 6.0动态权限申请以及拒绝后的控制