-1
Hi, I’m looking to learn a little more about WEB interactions with some languages. The language I’m focusing on is Python (I already have some knowledge). I am using the Selenium library - webdriver and I just want to make a script of mine click on a button of a respective site.
from selenium import webdriver
browser = webdriver.Chrome()
browser.get('https://outlook.live.com/owa/')
browser.maximize_window()
btn = browser.find_element_by_xpath('/html/body/header/div/aside/div/nav/ul/li[2]/a')
btn.click()
browser.quit()
This simple code is giving these problems.
C:\pythonDocuments\venv\Scripts\python.exe C:/pythonDocuments/main.py
Traceback (most recent call last):
File "C:\pythonDocuments\venv\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Users\ffccs\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\ffccs\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] O sistema não pode encontrar o arquivo especificado
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/pythonDocuments/main.py", line 3, in <module>
browser = webdriver.Chrome()
File "C:\pythonDocuments\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in __init__
self.service.start()
File "C:\pythonDocuments\venv\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
Process finished with exit code 1
Unfortunately it was not bad installation of the library, I already installed manually and installed the pycharm to do the installation for it too and nothing went right. Thanks in advance!