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:\SoftWare\webdrivers\chromedriver.exe')
driver=webdriver.Chrome(service=s)