I wanted to try autologin with Python but I get this error when I´m compiling:
Traceback (most recent call last):
File "C:\Users\thega\PycharmProjects\untitled\venv\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "C:\Users\thega\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 769, in __init__
restore_signals, start_new_session)
File "C:\Users\thega\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1172, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/thega/PycharmProjects/untitled/test.py", line 10, in <module>
driver = webdriver.Chrome('C:/Users/thega/Downloads/chromedriverwin64/')
File "C:\Users\thega\PycharmProjects\untitled\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in __init__
self.service.start()
File "C:\Users\thega\PycharmProjects\untitled\venv\lib\site-packages\selenium\webdriver\common\service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: '' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
Process finished with exit code 1
I´m using this code from Internet(it should work fine):
from selenium import webdriver
import time
username = 'name'
password = 'passwd'
url = 'https://www.page.net/'
driver = webdriver.Chrome('C:/Users/thega/Downloads/chromedriverwin64/')
driver.get(url)
driver.find_element_by_id('inputUsername').send_keys(username)
driver.find_element_by_id('inputPassword').send_keys(password)
time.sleep(2)
driver.find_element_by_id('loginButton').click()
PS: I´m new to Python. PS2: I´m using PyCharm if that helps. And yes, I have already installed selenium.
Thanks for any help.