I am trying to automate uploading an image. The uploader is a Flash object and using AutoIt is not an option. So I am trying to work my way around this with just webdriver.
The idea is to 'set' the value attribute of the image uploader with a link pointing to an image saved on the server. My question is, is there a method to set the attribute of an element in webdriver? I know there is one to get value (get_attribute). I am using Python/Selenium.
The input field is:
input type="hidden" value="" name="allImages" id="allImages"
and I have tried:
image = wd.find_element_by_id("allImages") image.value = "http://optimusprime/uploads/b31f8a31-9d4e-49a6-b613-fb902de6a823.jpg"
The script runs without error, but the attribute value is not set. Can anybody please point me to the right way of setting attributes? (if there is one)