Display results as :

Rechercher Advanced Search


sendkeys is not working for file upload

View previous topic View next topic Go down

sendkeys is not working for file upload

Post by jeevitha on Fri Jun 27, 2014 8:45 pm


I am using firefox version 30.0 with selenium IDE version 2.5.0.

I started the recording for the website http'colon''slash''slash'pdf2jpg'dot'net
Clicked 'Choose a PDF file'.  Uploaded a file from my machine.
Clicked 'Convert PDF to JPG'.
Stopped the recording and Exported Testcase as 'Python2 / Unitest / Webdriver'.

In the recorded py file, the contents are like this:

   def test_pdf(self):
        driver = self.driver
        driver.get(self.base_url + "/")

When I replayed the script, the file name that I entered did not come again.
In the above code, I edited the send_keys line with


Even then, the file name text box is coming blank, and script is not proceeding after that.  Please help me in uploading the file.

Thanks in advance.


Posts : 1
Join date : 2014-06-27

Back to top Go down

Re: sendkeys is not working for file upload

Post by mail2prassad on Fri Jul 18, 2014 7:43 pm

It looks like the IDs are generated dynalically ('html5_18rendrprhrsv8nonqc521tal3' - not a general static id). This might be the reason the filename is appearing blank.

Try reloading the page couple of times and see whether the ID remains same.


Posts : 41
Join date : 2013-06-05

Back to top Go down

Re: sendkeys is not working for file upload

Post by nabhanya.varma on Sat Sep 13, 2014 5:37 pm

If not with the dynamic ID, please check if that has a tag 'input' and is enabled.

It is mandatory that sendKeys() works only when the textbox is enabled. So please make sure that the input element is visible.

If not then we need to go for other third party tools which interacts with the OS controls.

Active particpant
Active particpant

Posts : 13
Join date : 2014-03-02

Back to top Go down

Re: sendkeys is not working for file upload

Post by Sponsored content Today at 3:21 am

Sponsored content

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum