**My code works fine on my computer but in google cloud i am getting same error over and over again. **
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
# Set the path to the Chrome binary and ChromeDriver
chrome_options = Options()
chrome_options.binary_location = "...."
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--disable-dev-shm-usage")
chrome_options.add_argument("--remote-debugging-port=9222")
chrome_options.add_argument("window-size=1920x1080")
# Start the Chrome browser
browser = webdriver.Chrome(options=chrome_options)
# Navigate to the Google homepage
browser.get("https://www.google.com.tr")
search_box = WebDriverWait(browser, 10).until(
EC.element_to_be_clickable((By.NAME, "q"))
)
print(search_box)
\#EC.element_to_be_clickable
# Enter the search query and submit the form
search_box.send_keys("Python programming")
search_box.submit()
print(browser.title)
this is error that i had. It works fine on my local computer.
raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable (Session info: headless chrome=112.0.5615.49) Stacktrace: \#0 0x555c82055a23 \<unknown\> \#1 0x555c81d83821 \<unknown\> \#2 0x555c81dba24c \<unknown\> \#3 0x555c81db9a66 \<unknown\> \#4 0x555c81de13c2 \<unknown\> \#5 0x555c81db5463 \<unknown\> \#6 0x555c81de158e \<unknown\> \#7 0x555c81df9d06 \<unknown\> \#8 0x555c81de1193 \<unknown\> \#9 0x555c81db3b5a \<unknown\> \#10 0x555c81db4c9e \<unknown\> \#11 0x555c8201775d \<unknown\> \#12 0x555c8201b60c \<unknown\> \#13 0x555c82024800 \<unknown\> \#14 0x555c8201c703 \<unknown\> \#15 0x555c81fef3c5 \<unknown\> \#16 0x555c8203f558 \<unknown\> \#17 0x555c8203f6e7 \<unknown\> \#18 0x555c8204d4b3 \<unknown\> \#19 0x7ff3aa79eea7 start_thread