I'm learning to automate with python and I am writing a simple code to open a website and log in. The login credentials have been changed. Any help is greatly appreciated. Here's the code:
from selenium import webdriver
myArcadiaUsername = "randomusername"
myArcadiaPassword = "randompassword"
url = "https://arcadia-ccc-idp.auth.us-east-1.amazoncognito.com/login?client_id=24eomia4acadsscdt2jac0davr&redirect_uri=https%3A%2F%2Fccc.arcadiaanalytics.com%2Fomniauth%2Fcognito%2Fcallback&response_type=code&scope%5B%5D=openid&scope%5B%5D=email&scope%5B%5D=profile&state=89c98f8f8b105d27e43f5988e6c15b7efb880a572c5681e2"
driver = webdriver.Chrome()
driver.get(url)
def login(url,usernameId, username, passwordId, password, submit_buttonId):
driver.get(url)
driver.find_element_by_id("signInFormUsername").send_keys(username)
driver.find_element_by_id("signInFormPassword").send_keys(password)
driver.find_element_by_name("signInFormPassword").click()
print("logged in successfully")
Here's the error:
Traceback (most recent call last): File "C:\Users\USER\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\common\service.py", line 71, in start self.process = subprocess.Popen(cmd, env=self.env, File "C:\Users\USER\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 966, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\USER\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1435, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, 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\USER\Python Projects\Arcadia Desktop Login\LoginArcadia.py", line 9, in driver = webdriver.Chrome() File "C:\Users\USER\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 70, in init super(WebDriver, self).init(DesiredCapabilities.CHROME['browserName'], "goog", File "C:\Users\USER\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 90, in init self.service.start() File "C:\Users\USER\AppData\Local\Programs\Python\Python310\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://chromedriver.chromium.org/home