Here is my Python code
from selenium import webdriver
import time
driver = webdriver.Chrome('/usr/local/bin/chromedriver')
driver.get("https://www.immoweb.be")
elem1 = driver.find_element_by_link_text('FRANCAIS')
elem1.click()
elem2 = driver.find_element_by_link_text('Maisons')
elem2.click()
time.sleep(2)
#searchBar = driver.find_element_by_xpath('//*[@id="localisation"]')
searchBar = driver.find_element_by_name('localisation')
searchbar.send_keys('hello')
I would like to add text in the "localisation" field, but I got the following error message.
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="localisation"]"}
I tried the exact same code on other website, and it is working properly.