在IE中使用IE硒驱动程序

问题描述

我试图定义IE Web驱动程序以与python一起使用时,

im出现了一些我无法理解的错误。 maby,我必须在Internet Explorer上更改一些安全设置吗? 我有Interent Explorer版本11 谢谢。

from selenium import webdriver

driver = webdriver.Ie(executable_path=r"C:\Users\cohe\PycharmProjects\Testing\IEDriverServer.exe")

i got some errors:

Traceback (most recent call last):
  File "C:/Users/cohe/PycharmProjects/Testing/Shrepoint.py",line 3,in <module>
    driver = webdriver.Ie(executable_path=r"C:\Users\cohe\PycharmProjects\Testing\IEDriverServer.exe")
  File "C:\Users\cohe\AppData\Roaming\Python\Python38\site-packages\selenium\webdriver\ie\webdriver.py",line 54,in __init__
    warnings.warn('executable_path has been deprecated,please pass in a Service object',NameError: name 'warnings' is not defined

注意:我正在使用硒4.0.0a1

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)