Hi All,
I am trying to upload any dummy file from any arbitrary path but this is not working. I have removed driver.close() ,juts to check my file is uploaded or not .
Please change the path of file which you want to upload and I am opening generic site.
Also can some one explain the meaning of this output
I am trying to upload any dummy file from any arbitrary path but this is not working. I have removed driver.close() ,juts to check my file is uploaded or not .
Please change the path of file which you want to upload and I am opening generic site.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
#Getting local session of Chrome
driver=webdriver.Chrome()
#put here the adress of your page
driver.get("https://files.fm/")
#put here the content you have put in Notepad, ie the XPath
#elem=driver.find_elements_by_xpath( '//*[@id="tsf"]/div[2]/div[3]/center/input[1]')############### this is one of name
#elem.send_keys("google search through python")
'''for e in elem:
e.send_keys("google search through python")'''
elem2=driver.find_element_by_id('file_upload').send_keys("C:\\Users\\pubhatia\\Documents\\learning\\python\\call_url.py")
print(elem2)
##driver.close()Output:DevTools listening on ws://127.0.0.1:12670/devtools/browser/9a8e734d-27a3-490f-ac0f-521545234943
NonePlease confirm what is wrong in this code Also can some one explain the meaning of this output
