I am working in python using selenium and web driver
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
path="E:\Allah Kareem HelpmeGuid me\chromedriver.exe"
driver= webdriver.Chrome(path)
driver.get("https://lsg3.nlm.nih.gov/webapps/WebTc.2011/jsp/jdi/vJdi.jsp")
search=driver.find_element_by_name('IN_TERM ')
print(search)
search.send_keys("Glutathione S-transferase-dependent"+Keys.ENTER)
search.send_keys(Keys.RETURN)
driver.quit()
but I got error
Traceback (most recent call last): File "E:\Guide_me\selenum.py", line 9, in search=driver.find_element_by_name('IN_TERM ') File "E:\Allah Kareem HelpmeGuid me\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 496, in find_element_by_name return self.find_element(by=By.NAME, value=name) File "E:\Allah Kareem HelpmeGuid me\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 978, in find_element 'value': value})['value'] File "E:\Allah Kareem HelpmeGuid me\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "E:\Allah Kareem HelpmeGuid me\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="IN_TERM "]"} (Session info: chrome=86.0.4240.75)
please check my code and error input web page contain only one input and then GO will perform and result will appear in text area thanks in advance
IN_TERM
? and ii) There is a space afterIN TERM
? If not -- try removing the space atdriver.find_element_by_name('IN_TERM ")
– Somenath Sinha