i try to automate a site with the below code -
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from webdriver_manager.chrome import ChromeDriverManager
import time
link = "https://www.bcassessment.ca/"
options = Options()
options.add_argument("start-maximized")
options.add_argument('window-size=1920x1080')
options.add_argument('--no-sandbox')
options.add_argument('--disable-gpu')
srv=Service(ChromeDriverManager().install())
driver = webdriver.Chrome (service=srv, options=options)
waitWebDriver = WebDriverWait (driver, 10)
driver.get (link)
waitWebDriver.until(EC.element_to_be_clickable( \
(By.XPATH, "//input[@id= 'rsbSearch']"))).send_keys("106 Maple")
driver.find_element(By.XPATH, "//input[@id= 'rsbSearch']").send_keys(Keys.ARROW_DOWN)
driver.find_element(By.XPATH, "//input[@id= 'rsbSearch']").send_keys(Keys.ENTER)
time.sleep(500)
The textinput to the field works fine - but then its necessary to press the Down-Key and afterwards the Return-Key to get the search-result. But this is not working with Selenium.
Why is that and what is necessary to do so i get to the search result (eg. press down and enter)?