Error: Youtube opens and closes without executing the operations. Is there any way we can place chromedriver in selenium file or any other way out.
I tried this .:
import selenium from selenium import webdriver from selenium.webdriver.common.by import By import time url='https://youtube.com' driver=webdriver.Chrome() driver.get(url) searchbox=driver.find_element(By.XPATH,'//*[@id="search"]') searchbox.send_keys("Google") searchbutton=driver.find_element(By.XPATH,'//*[@id="search-icon-legacy"]/yt-icon/yt-icon- shape/icon-shape/div') searchbutton.click() time.sleep(25) driver.quit()