Button does not respond
k3fjeee opened this issue · 1 comments
Hello! I'm trying to upload a video to youtube by clicking the "Select Files" button. But the button is not responding.
import undetected_chromedriver as uc
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver import Chrome
from selenium.webdriver.chrome.options import Options
from time import sleep---------- EDIT ----------
email = 'mail\n' # replace email
password = 'pass\n' # replace password---------- EDIT ----------
driver = uc.Chrome(use_subprocess=True)
wait = WebDriverWait(driver, 20)
url = 'https://youtube.com/upload'
driver.get(url)wait.until(EC.visibility_of_element_located((By.NAME, 'identifier'))).send_keys(email)
wait.until(EC.visibility_of_element_located((By.NAME, 'password'))).send_keys(password)
wait.until(EC.element_to_be_clickable((By.XPATH, "//input[@type='file']"))).send_keys('C:\Users\xyz\Desktop\videos\1.mp4')sleep(10)
`Traceback (most recent call last):
File "C:\Users\xyz\Desktop\ddd\yt.py", line 24, in
wait.until(EC.element_to_be_clickable((By.XPATH, "//input[@type='file']"))).send_keys('C:\Users\xyz\Desktop\videos\1.mp4')
File "C:\Users\xyz\Desktop\venv\lib\site-packages\selenium\webdriver\support\wait.py", line 87, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Stacktrace:
Backtrace:
Ordinal0 [0x010FD953+2414931]
Ordinal0 [0x0108F5E1+1963489]
Ordinal0 [0x00F7C6B8+837304]
Ordinal0 [0x00FA9500+1021184]
Ordinal0 [0x00FA979B+1021851]
Ordinal0 [0x00FD6502+1205506]
Ordinal0 [0x00FC44E4+1131748]
Ordinal0 [0x00FD4812+1198098]
Ordinal0 [0x00FC42B6+1131190]
Ordinal0 [0x00F9E860+976992]
Ordinal0 [0x00F9F756+980822]
GetHandleVerifier [0x0136CC62+2510274]
GetHandleVerifier [0x0135F760+2455744]
GetHandleVerifier [0x0118EABA+551962]
GetHandleVerifier [0x0118D916+547446]
Ordinal0 [0x01095F3B+1990459]
Ordinal0 [0x0109A898+2009240]
Ordinal0 [0x0109A985+2009477]
Ordinal0 [0x010A3AD1+2046673]
BaseThreadInitThunk [0x74B40419+25]
RtlGetAppContainerNamedObjectPath [0x76FD66DD+237]
RtlGetAppContainerNamedObjectPath [0x76FD66AD+189]
Process finished with exit code 1`
Please refer to a site like https://stackoverflow.com for things like that @k3fjeee