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

python3+selenium3遇到的问题:Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.firefox.service.Service object at 0x0045E450>>

时间:2016-10-23 09:43:07      阅读:428      评论:0      收藏:0      [点我收藏+]

标签:exec   ref   src   desktop   blog   eth   .exe   添加   img   

我解决了!!!
from selenium import webdriver
import time
dr = webdriver.Firefox(executable_path = ‘/Users/jinwenxin/desktop/pythonPractice/geckodriver‘)
time.sleep(5)
print ‘Browser will close.‘
dr.quit()
 
也就是往 driver=webdriver.Firefox()里添加下载的新的引擎地址executable_path = ‘C:\Program Files\Mozilla Firefox\geckodriver.exe‘
即: driver=webdriver.Firefox(executable_path = ‘C:\Program Files\Mozilla Firefox\geckodriver.exe‘)
这样就不会报错
如下图:
技术分享

python3+selenium3遇到的问题:Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.firefox.service.Service object at 0x0045E450>>

标签:exec   ref   src   desktop   blog   eth   .exe   添加   img   

原文地址:http://www.cnblogs.com/my-blogs-for-everone/p/5988996.html

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