HTMLI want to select a textbox using XPath
or any other locator, but I am unable to do so. The code is working fine for one part of the page, while it is not working using any locator for the other half of the page. I am not sure if my code is wrong or if something else is the problem.
I have attached the HTML part.
Here is my code:
import selenium
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
driver = webdriver.Chrome()
driver.get('Website')
driver.implicitly_wait(50)
driver.find_element_by_xpath('//*[@id="j_username"]').send_keys("Username")
driver.find_element_by_xpath('//*[@id="j_password"]').send_keys("Password")
driver.find_element_by_xpath('//*[@id="b_submit"]').click()
driver.find_element_by_xpath('//*[@id="15301"]/div[1]/a/span').click()
driver.find_element_by_xpath('//*[@id="22261"]/a').click()
driver.find_element_by_xpath('//*[@id="22323"]/a').click()
driver.implicitly_wait(50)
driver.find_element_by_xpath('//*[@id="filterRow"]').clear()
The last line is where I am getting the following error:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="filterRow"]"}