Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get familiar with selenium. I decided to try to work with facebook, and fulfill my profile with selenium, But they use too much Ajax.

It's not very complicated to fulfill my hometown and so on, but I don't really know how to upload an image. They have an Ajax form to choose between upload and webcam photo. And then I need to handle somehow an upload dialog... any ideas?

share|improve this question
can you give us an example on how the site looks like ? this will help us to figure out what a solution – chuan Jan 29 '14 at 17:00
possible duplicate of How can I work with file uploads during a Webdriver test? – Yamikuronue Apr 29 '15 at 16:36

You should be able to use the solutions outlined in this similar question on StackOverflow:

driver = webdriver.Firefox()
element = driver.find_element_by_id("fileUpload")

This should allow you to interact with the file upload without automating the dialog box.

If you do need to interact with the dialog box, you'll need to use another library, as the dialog box is a Windows component and Selenium does not understand how to interact with Windows components, only with web pages.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.