I'm a beginner in Selenium. I want to type the address in the search box. But I have a problem with finding that field. Field HTML code:
<input type="text" class="SearchField_SearchField__hDobT" placeholder="Address..." value="">
I'm trying to do something like this:
element = driver.find_element_by_xpath("//input[@class='SearchField_SearchField__hDobT']")
or
element=driver.find_element_by_class_name("SearchField_SearchField__hDobT")
I get that errors:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@class='SearchField_SearchField__hDobT']"}
(Session info: chrome=80.0.3987.132)
or
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".SearchField_SearchField__hDobT"}
(Session info: chrome=80.0.3987.132).
I cannot access other fields either. I render the HTML content with JavaScript.
I don't know what the problem is. Please help!