Chrome

chrome的webdriver :  http://chromedriver.storage.googleapis.com/index.html

chrome的webdriver需要对应chrome版本下载, 不同版本之间可能会出现不兼容情况.

Firefox

Firefox的webdriver : https://github.com/mozilla/geckodriver/releases/

Firefox的webdriver下载最新的即可.

IE

IE的webdriver : http://selenium-release.storage.googleapis.com/index.html

IE的webdriver建议下载32位驱动,64位windows系统也可使用32位驱动.  不推荐64位驱动的原因在于, 已知bug中, 在对网页元素输入字符串时速度极慢,如用下列代码时, 第13行键入字符串时, fengh.ssc需要耗时10秒.

 def login(name='fengh.ssc', password='bob0.0.8'):
'''登录fss系统'''
global gl_driver
gl_driver = webdriver.Firefox()
gl_driver.maximize_window()
gl_driver.get("http://fss.sinopec.com")
if "财务共享自助服务" in gl_driver.title:
system = gl_driver.find_element_by_id('systemId')
system.click()
system.send_keys(Keys.PAGE_UP, Keys.ENTER)
user = gl_driver.find_element_by_name("loginnamesrc")
user.clear()
user.send_keys(name, Keys.TAB, password, Keys.ENTER)
# password = gl_driver.find_element_by_name('passwordsrc')#passwordsrc命名重复,无法定位
else:
print("请检查网络是否正常")
 

最新文章

  1. sql查询
  2. LeetCode:Two Sum II
  3. Android深度探索--HAL与驱动开发----第八章读书笔记
  4. 【转】Backbone使用总结
  5. HTML标签小结
  6. loopback 02
  7. CodeIgniter类库之Benchmarking Class ,计算代码的执行时间
  8. Matlab使用难点记忆
  9. virtualization-vs-containerization
  10. rpm软件包类型
  11. Excel设置下拉选项的方法
  12. 一道看似简单的sql需求(转)
  13. Q:记学习枚举过程中的一个小问题
  14. java笔试要点(java多线程)
  15. pta
  16. JQ 向上查找指定 同辈元素 找到后返回
  17. Lodop在页面获取打印机列表 选择打印机预览
  18. JavaWeb工程 目录结构***
  19. 在Ubuntu16.04上使用Autofs
  20. 在 ASP.NET Web API 中,使用 命名空间(namespace) 来作为路由的参数

热门文章

  1. 关于group by的用法
  2. tensorflow 训练的时候loss=nan
  3. elasticsearch的基本用法(转载)
  4. Python3数据科学入门与实践✍✍✍
  5. java-day17
  6. callable接口的多线程实现方式
  7. iOS开发系列-NSFileManager
  8. java 对象转Map方法Demo
  9. 理解Spring框架中Bean的5个作用域
  10. wxid 转微信号