Is there a way to select pictures in a pop-up using Python Selenium?
<p>I am able to do all the basic web actions using Selenium, but I would like to do the following:</p>

<p>Click on a "select image" button, then there comes a pop-up, then I would like to enter some text in #1 and #2, and click #3.</p>

<p><a href="https://i.stack.imgur.com/GpEkr.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GpEkr.jpg" alt="enter image description here"></a></p>

<p>Edition: What I have tried is on kijiji site, after clicking the select image button, I select two images (see picture), then I backward locate these image holder and find the Xpath, then I added the following codes (below), but it doesn't seem to do anything, it gave me some stacktrace message and no error.</p>

<pre><code>imageLoc = "C:\AbsolutePath\IMG_20150620_184908_Edited_sm.jpg"
imageHolderXpath = '(//div[@class="image"])[1]'
imageHolderElement = WebDriverWait(driver, 5).until(lambda driver: driver.find_element_by_xpath(imageHolderXpath))
imageHolderElement.send_keys(imageLoc)
</code></pre>

<p>Output: </p>

<pre><code>Message: 
Stacktrace:
    at FirefoxDriver.prototype.findElementInternal_ (file:///c:/users/kubik/appdata/local/temp/tmp_sthxl/extensions/fxdriver@googlecode.com/components/driver-component.js:10659)
    at FirefoxDriver.prototype.findElement (file:///c:/users/kubik/appdata/local/temp/tmp_sthxl/extensions/fxdriver@googlecode.com/components/driver-component.js:10668)
    at DelayedCommand.prototype.executeInternal_/h (file:///c:/users/kubik/appdata/local/temp/tmp_sthxl/extensions/fxdriver@googlecode.com/components/command-processor.js:12534)
    at DelayedCommand.prototype.executeInternal_ (file:///c:/users/kubik/appdata/local/temp/tmp_sthxl/extensions/fxdriver@googlecode.com/components/command-processor.js:12539)
    at DelayedCommand.prototype.execute/&lt; (file:///c:/users/kubik/appdata/local/temp/tmp_sthxl/extensions/fxdriver@googlecode.com/components/command-processor.js:12481)
[Finished in 30.3s]
</code></pre>

<p><a href="https://i.stack.imgur.com/DiIA9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DiIA9.jpg" alt="enter image description here"></a></p>