我是靠谱客的博主 深情往事,最近开发中收集的这篇文章主要介绍DeprecationWarning: executable_path has been deprecated, please pass in a Service object driver=weDeprecationWarning: executable_path has been deprecated, please pass in a Service objectdriver=webdriver.Chrome(executable_path=,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述
DeprecationWarning: executable_path has been deprecated, please pass in a Service object
driver=webdriver.Chrome(executable_path=
原因:executable_path被重构到了Service函数中
class Service(service.ChromiumService):
def __init__(self,executable_path,port=0,service_args=None,log_path=None,env=None)
...
解决:
from selenium.webdriver.chrome.service import Service
s=Service(r'D:SoftWarewebdriverschromedriver.exe')
driver=webdriver.Chrome(service=s)
最后
以上就是深情往事为你收集整理的DeprecationWarning: executable_path has been deprecated, please pass in a Service object driver=weDeprecationWarning: executable_path has been deprecated, please pass in a Service objectdriver=webdriver.Chrome(executable_path=的全部内容,希望文章能够帮你解决DeprecationWarning: executable_path has been deprecated, please pass in a Service object driver=weDeprecationWarning: executable_path has been deprecated, please pass in a Service objectdriver=webdriver.Chrome(executable_path=所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复