emagnun <soorajspadmanab...@gmail.com> writes: > I'm using latest python and latest Selenium chrome webdriver. I'm > trying to have a simple code to search in youtube but I'm getting the > below error. Can anyone help me? > > File "search.py", line 8, in searchBox.click() > Selenium.common.exceptions.ElementNotInteractableException: Message: > element not interactable >
Try checking what kind of element it finds for you (perhaps by logging searchBox.tag_name). There might be multiple elements matching the search criteria. > #MyCodeStartsHere > from selenium import webdriver > > driver = webdriver.Chrome() > driver.get('https://youtube.com') > > searchBox = driver.find_element_by_xpath('//*[@id="search"]') > if searchBox.is_enabled(): > searchBox.click() > searchBox.send_keys("youtube test") > searchButton = > driver.find_element_by_xpath('//*[@id="search-icon-legacy"]/yt-icon') > searchButton.click() > else: > print("What the heck") > #MyCodeEndsHere -- regards, kushal -- https://mail.python.org/mailman/listinfo/python-list