I am trying to use Python to automate something.
I can't seem to locate the email input element with driver.find_element_by_
. I tried so many different ways. I just want to be able to log into the website with Chromedriver.
<div class="css-1ilyui9">
<input type="email" required="" class="css-cgadzw" value="">
</div>
The email input box doesn't have any attributes. No name or id. Class is not unique. Password box has the same class.
This is what I have so far. I just want Python to log in for me and go to a certain page periodically but I am unable to send_key because I can't find the element. It keeps saying "element not found".
from selenium import webdriver
chrome_path = r"C:\Users\peter\Desktop\chromedriver.exe"
driver = webdriver.Chrome(executable_path=r"C:\Users\peter\Desktop\chromedriver.exe")
driver.get("https://")
driver.find_element_by_xpath("//input[@type='email']")
Error Code:
selenium.common.exceptions.NoSuchElementException:
Message: no such element:
Unable to locate element: {"method":"xpath","selector":"//input[@type='email']"}
(Session info: chrome=78.0.3904.108)