Hi I’m new to Python and just trying learn the basics of Python and selenium. I’ve been trying to run a simple automation for the past two days, but cannot get it working . I’ve been searching trying to figure out how to fix this error, I’ve found a few other people that got it but no solution.
What happens I run my script with ‘py main.js’ the page loads up, but it executes none of the code I gave it and throws two errors.
Error 1 : 'selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable.
Error 2:
Bluetooth: bluetooth_adapter_winrt.cc:1074 Getting Default Adapter failed.
If someone knows what’s causing these and how to fix them please let me know. I should also note that the code I’m running is direct from a youtube tutorial copied line for line so I know it should work. Thank you!
The code
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://www.youtube.com')
print(driver.title)
print(driver.current_url)
searchbox = driver.find_element_by_xpath('//*[@id="search"]')
searchbox.send_keys('candy')
time.sleep(2)
searchIcon = driver.find_element_by_xpath('//*[@id="search-icon-legacy"]')
searchIcon.click()