Python Forum
unable to load file using python selenium
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unable to load file using python selenium
#5
elem2=driver.find_element_by_id('file_upload')
print(elem2)
elem2.send_keys("C:\\Users\\pubhatia\\Documents\\learning\\python\\call_url.py")
Ok that looking good. This means that you did manage to find the element and then you did manage to upload path.
But you seem to close the webdriver. I would suggest that you seen send an "ENTER" key for upload the file path you want to upload

builder = Actions(driver);
builder.keyDown(Keys.ENTRE).perform()
I haven't tested the code. That was such and idea. Lookup the selenium doc.
Reply


Messages In This Thread
RE: unable to load file using python selenium - by hshivaraj - Dec-12-2017, 04:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Selenium Parsing (unable to Parse page after loading) oneclick 7 6,018 Oct-30-2020, 08:13 PM
Last Post: tomalex
  Webcrawler with Selenium and Browsermob, Har file not complete Smartkoncept 0 1,315 Jul-23-2020, 08:06 AM
Last Post: Smartkoncept
  Selenium cant get xpaths/load url draw134 2 1,894 Mar-30-2020, 11:24 AM
Last Post: draw134
  Scrapping javascript website with Selenium where pages randomly fail to load JuanJuan 14 7,216 Dec-27-2019, 12:32 PM
Last Post: JuanJuan
  Unable to access javaScript generated data with selenium and headless FireFox. pjn4 0 2,550 Aug-04-2019, 11:10 AM
Last Post: pjn4
  Unable to gather data using beautifulscoup() [Output shows blank file] rishab123s 1 3,129 Apr-13-2018, 04:35 PM
Last Post: snippsat
  file upload from windows10 machine using send_key in selenium fails nithya_g 3 4,636 Jan-12-2018, 09:32 PM
Last Post: metulburr
  Unable to select iframe using selenium endejoli 1 2,983 Jan-11-2018, 05:13 PM
Last Post: j.crater
  Unable to load cookies with Pickle HiImNew 5 11,843 Jan-04-2018, 12:36 PM
Last Post: snippsat
  Error in Selenium: CRITICAL:root:Selenium module is not installed...Exiting program. AcszE 1 3,632 Nov-03-2017, 08:41 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020