Raul2018

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2018年7月10日

摘要: 对于xpath元素定位,解决办法总结如下。 第一种方法:通过绝对路径做定位(相信大家不会使用这种方式) By.xpath("html/body/div/form/input") By.xpath("//input") 第三种方法:通过元素索引定位 By.xpath("//input[4]") 第四种 阅读全文
posted @ 2018-07-10 15:55 Raul2018 阅读(352) 评论(0) 推荐(0) 编辑

摘要: 代码如下(网上示例): #profile = webdriver.FirefoxProfile(r"C:\Users\Skyyj\AppData\Roaming\Mozilla\Firefox\Profiles\1rzh6139.default")profile = webdriver.Firefo 阅读全文
posted @ 2018-07-10 13:35 Raul2018 阅读(1111) 评论(0) 推荐(0) 编辑