码迷,mamicode.com
首页 > 编程语言 > 详细

python3下安装Selenium插件和驱动

时间:2018-06-30 20:23:10      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:exec   IV   name   esc   table   file   cut   drivers   int   

import sys
import os
import shutil
import time

os.system(‘pip install selenium‘)


file_name="IEDriverServer.exe"

#获取路径
python_path=os.path.dirname(sys.executable)
system_path=os.environ[‘WINDIR‘]+‘\\system32‘

#安装IEDriverServer
Desc_py_path=python_path+"\\"+file_name
Desc_sys_path=system_path+"\\"+file_name

shutil.copyfile(file_name,Desc_py_path)
shutil.copyfile(file_name,Desc_sys_path)
print("Selenium插件和驱动已经安装完成!!!")

 

python3下安装Selenium插件和驱动

标签:exec   IV   name   esc   table   file   cut   drivers   int   

原文地址:https://www.cnblogs.com/dengpeiyou/p/9248477.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!