I'm new to Selenium. I am trying to interact with the search bar of this website: https://www.careerjunction.co.za, in order to have the user of my program search for some job, and then scrape the information about that job. This is my code so far:
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time
link = 'https://www.careerjunction.co.za'
path = r"C:\Users\--myName\Downloads\chromedriver-win64\chromedriver-win64\chromedriver.exe"
service = Service(executable_path=path)
driver = webdriver.Chrome(service = service)
driver.get(link)
time.sleep(2)
u_search = input("Please enter the job you are looking for: ")
search = driver.find_element(By.NAME, "keywords")
search.send_keys(u_search)
search.send_keys(Keys.RETURN)
I am getting an element not interactable error, I assume on the search bar element. I have tried:
search = WebDriverWait(driver, 10).until(
EC.element_to_be_clickable((By.NAME, "keywords"))
As well as:
driver.execute_script("arguments[0].scrollIntoView(true);", search)
Also using:
version 137.0.7151.69 Chrome and 137.0.7151.68 ChromeDriver
Any insights as to what the problem may be? But neither seem to work. Any insights to what the issue may be?