首页 > 代码库 > python3+selenium3遇到的问题:Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.firefox.service.Service object at 0x0045E450>>
python3+selenium3遇到的问题:Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.firefox.service.Service object at 0x0045E450>>
我解决了!!!
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()
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>>
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。