I installed chropath to finding out the xpath for websites.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome("C:\\Users\\ADMIN\\Downloads\\chromedriver_win32\\chromedriver.exe")
driver.get("https://kite.zerodha.com")
username = driver.find_element_by_xpath("//input[@placeholder='User ID']")
username.send_keys("abcc")
I wanted to find username xpath using chropath and it gave me //input[@placeholder='User ID']
but it is still giving me NoSuchElementException
error. I thought chropath extension would always give me correct xpath.
What can be the reason for this ?
This is the code that I get when I inspect Username
<input type="text" placeholder="User ID" autocorrect="off" maxlength="6" autofocus="autofocus" autocapitalize="characters" animate="true" label="" rules="[object Object]" dynamicwidthsize="8" xpath="1">