【发布时间】:2022-01-24 20:39:44
【问题描述】:
好的,所以我正在使用笔记本电脑 rn,我从我的 PC 复制并粘贴了我的代码,但它突然无法正常工作。我已经安装了相同的 Selenium,但现在它正在运行,我收到了 DeprecationWarnings,driver.find_element_by_xpath 不起作用等等。
def click():
driver = webdriver.Chrome(executable_path="C:\webdrivers\chromedriver.exe", chrome_options=options_)
driver.get("http://www.discord.com")
driver.find_element_by_xpath()
这是我写的不再起作用的例子,driver.find_element_by_xpath() 有一条线穿过它!当我在另一个 py 文件(在 pycharm 中)中重写它时,它不喜欢我使用驱动程序,它带有红色下划线。
有人能解释一下到底发生了什么吗?
【问题讨论】:
标签: python selenium deprecation-warning findelement selenium-webdriver-python