Есть кнопка add file задается id=“SWFUpload_0”, куда подсунуть send_keys(“B:\ter.jpg”) для загрузки изображения.
WebDriver + Python
<div class="controls">
<div class="well-bg-white width-600">
<div class="banner-upload-container">
<p>
The recommended dimensions for this ad group are
<b>
38x38, 120x20, 120x600, 168x28, 216x36, 250x250, 250x125, 292x60, 300x50, 300x250, 300x30, 320x50, 320x53, 320x480, 320x568, 320x48, 468x60, 480x60, 480x320, 480x75, 500x130, 728x90, 768x1024, 768x66, 1024x768
</b>
dimension.
</p>
<p>
Please upload at least one of the recommended banners
</p>
<p>
The accepted banner formats are JPG, GIF, PNG. The maximum banner size is 400 KB.
</p>
</div>
<div class="file-list" style="">
<h4>Files Selected For Upload</h4>
<ul class="list"><li class="item"><p>jolly.jpg <a href="remove" class="right-but action"><i class="icon-remove"></i></a></p> </li></ul></div>
<div>
<object id="SWFUpload_0" type="application/x-shockwave-flash" data="/swfupload/swfupload.swf?preventswfcaching=1384334421186" width="77" height="30" class="swfupload"><param name="wmode" value="window"><param name="movie" value="/swfupload/swfupload.swf?preventswfcaching=1384334421186"><param name="quality" value="high"><param name="menu" value="false"><param name="allowScriptAccess" value="always"><param name="flashvars" value="movieName=SWFUpload_0&uploadURL=%2Fadvertiser%2Fv2%2FuploadBanner.html&useQueryString=false&requeueOnError=false&httpSuccess=&assumeSuccessTimeout=0&params=adGroupId%3Df416a6f5e9c74e1d9598f610e6c536ac%26amp%3BcontentId%3Daf8ec635a8b7a7c109ebe33b8fc8ffcd&filePostName=fileData&fileTypes=*.png%3B%20*.jpg%3B%20*.gif%3B%20*.jpeg&fileTypesDescription=Image%20Files&fileSizeLimit=100%20MB&fileUploadLimit=100&fileQueueLimit=100&debugEnabled=false&buttonImageURL=%2Fadvimages%2Fadd-files.png&buttonWidth=77&buttonHeight=30&buttonText=&buttonTextTopPadding=0&buttonTextLeftPadding=0&buttonTextStyle=color%3A%20%23000000%3B%20font-size%3A%2016pt%3B&buttonAction=-110&buttonDisabled=false&buttonCursor=-1"></object>
<button class="upload-but btn">Upload</button>
</div>
</div>
<div class="uploaded-list" style="display: none">
<div class="well-bg-white width-600">
<h4>Uploaded Banners</h4>
<ul class="list"><li class="no-data">No banners uploaded </li></ul></div>
</div>
<span class="help-inline"></span>
</div>