zoukankan      html  css  js  c++  java
  • python selenium教程

    参考:https://jingyan.baidu.com/article/495ba841d4200438b20ede53.html

    环境: windows10

    1. 安装 Python

    https://www.python.org/

    2. selenium安装:

    pip install selenium
    • 权限问题

    解决:https://www.cnblogs.com/liaojiafa/p/5100550.html

    Exception:
    Traceback (most recent call last):
      File "c:program filespython35libsite-packagespipasecommand.py", line 21
    1, in main
        status = self.run(options, args)
      File "c:program filespython35libsite-packagespipcommandsinstall.py", li
    ne 311, in run
        root=options.root_path,
      File "c:program filespython35libsite-packagespip
    eq
    eq_set.py", line 64
    6, in install
        **kwargs
      File "c:program filespython35libsite-packagespip
    eq
    eq_install.py", lin
    e 803, in install
        self.move_wheel_files(self.source_dir, root=root)
      File "c:program filespython35libsite-packagespip
    eq
    eq_install.py", lin
    e 998, in move_wheel_files
        isolated=self.isolated,
      File "c:program filespython35libsite-packagespipwheel.py", line 339, in
    move_wheel_files
        clobber(source, lib_dir, True)
      File "c:program filespython35libsite-packagespipwheel.py", line 310, in
    clobber
        ensure_dir(destdir)
      File "c:program filespython35libsite-packagespiputils\__init__.py", line
     71, in ensure_dir
        os.makedirs(path)
      File "c:program filespython35libos.py", line 241, in makedirs
        mkdir(name, mode)
    PermissionError: [WinError 5] 拒绝访问。: 'c:\program files\python35\Lib\sit
    e-packages\xlwt'

    3. 浏览器驱动配置(Chrome)

    http://chromedriver.storage.googleapis.com/index.html

    将 chromedriver.exe 直接 copy 到如下 python 解释器的安装目录

  • 相关阅读:
    FreeMarker缓存处理
    freemarker入门实例与源码研究准备工作
    Freemarker常用技巧(二)
    Freemarker常用技巧(一)
    Hessian与Spring整合
    Hessian学习
    数组常见的面试题
    关于排序的实现
    Redis与Memcache的区别
    JDBC编程步骤
  • 原文地址:https://www.cnblogs.com/xiluhua/p/12232480.html
Copyright © 2011-2022 走看看