Autoclick over swf button in web browser (uploadify)?

I need generate auto click on swf button for the controller uploadify.

The problem is, with load html page I need open dialog file, automatically...

With Selenium web driver is possible, but I cannot use with Javascript/jQuery

Code:

<html>
<head>
<script>
    function simulateClick() {
    var evt = document.createEvent("MouseEvents");
    evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
    var cb = document.getElementById("field-upload");
    cb.dispatchEvent(evt);
}
</script>
</head>

 <body onload="simulateClick();">

   <object type="application/x-shockwave-flash" 
     data="plugins/uploadify/uploadify.swf" id="field-upload"> 
      <param name="quality" value="high">
      <param name="wmode" value="transparent">
      <param name="allowScriptAccess" value="sameDomain">`
   </object>

 </body>

</html>

Upvotes: 4

Views: 691

Answers (1)

Denis Rudov
Denis Rudov

Reputation: 863

It's not possible to do this click.

Upvotes: 2

Related Questions