Display results as :
Advanced Search

Go down
Posts : 2
Join date : 2012-12-18

problems automating file upload in firefox Empty problems automating file upload in firefox

on Tue Dec 18, 2012 6:22 am
Hi, I'm using the latest selenium with firefox to automate uploading a
file. I was able to determine the xpath to type into the file upload
dialog's filename input field(to specify what file to upload). A
strange thing I noticed is that after typing the filename, it uploads
the file into my application. However, the file upload dialogue never
closes! I'm confused about two things:

1. The file was uploaded
- in order for this to happen besides typing in the filename(which is
all I coded) you would need to either click OK in the file upload
dialogue OR click enter. Using the debugger to step through the code,
neither was done.
2. So somehow the file gets uploaded even though
it doesn't look like the file upload dialogue had "" typed
or "OK" clicked. I need to close the dialogue though to detect the
xpath of the uploaded file. Ideally I'd like to do this by clicking
"OK" in the file upload dialogue but I can't find the xpath for the
button through firebug, xpath checker, or selenium. I noticed that if I
were to perform the upload manually, I can press to close
the file upload dialogue. I used object>.Type(Keys.ESCAPE). Performing that line in the debugger told
me the "Type" method returned true, meaning it successfully executed
this, and yet nothing happened!

It looks like the file upload
dialogue is native to firefox because it has a firefox logo on the top
left. I would appreciate it if someone could tell me how I can find the
xpath for elements in the file upload dialogue or why pressing
in the dialogue isn't closing it. Thank you.
Back to top
Permissions in this forum:
You cannot reply to topics in this forum