im trying to define IE web driver to work with python and i have some errors that i cant undetrstand. maby i have to change some security setting at internet explorer ? i have interent explorer version 11 thank you .
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
Note: I'm using selenium 4.0.0a1
It's not that clear which version of Selenium python clients you are using. However, the latest stable version of Selenium Python client is v3.141.0.
So for production environment instead of Selenium 4.0.0a1 you need to use Selenium 3.141.0
Additionally, as you are using the raw switch i.e.
r, instead of the double quotes, you need to use the single quotes. Effectively your line of code will be: