I am trying to automate an upload of a file to my github repo.
Code:
from selenium import webdriver
browser=webdriver.Chrome(r'C:\Users\Eliran\Desktop\chromedriver')
browser.get('https://github.com/login')
username=browser.find_element_by_id('login_field')
username.send_keys(myemail)
password=browser.find_element_by_id('password')
password.send_keys(mypassword)
sign_in_btn=browser.find_element_by_name('commit')
sign_in_btn.click()
browser.get('https://github.com/DevEliran/DevEliran.github.io/upload/master') #pathing immidiately to "upload files" in my repo
commit=browser.find_elements_by_xpath("/html/body/div[4]/div/main/div[2]/div/form/button")[0] # commit button
upload=browser.find_element_by_class_name('manual-file-chooser')#manually uploading my file
upload.send_keys(myfilepath)
commit.click()
after commit.click()
the page refreshes and present an error : "Add some files to include in this commit."
I have double checked every element. Has anyone came across a same problem ?